Reference to asterisk field of a map template
General Information
Clauses: 6.2.15.4
Summary
Index notation using the asterisk literal is problematic in case of templates with the value or omit restriction. Technically, it is not forbidden at the moment. It will always yield false on the right hand side as templates with these restrictions cannot contain matching symbols. On the left hand side, it will produce an error when the RHS contains true and it will do nothing when the RHS resolves to false. However, when the reference to the asterisk property is passed to a function as an actual inout parameter, the function can freely change this property to true. That's because the function code is completely unaware of the original template restriction (v_map[*] yields a simple boolean non-template value reference with no additional restrictions). This will circumvent the original restriction and create an invalid TE state unless the testing tool has a dedicated code for handling this situation.
Description
Because there's no use of this kind of reference for map templates with value and omit restrictions, I propose to add the following restriction to 6.2.15.4:
b) When the asterisk literal is used as an index, ValueRef shall resolve into an unrestricted template or a template with the present restriction. An error shall be issued when ValueRef is not a template or if it resolves into a template with the value or omit restriction.