I've opened Mantis 1858 and added a proposal for extending inline constraints to permit "item." prefixes to identifiers. This arose from a discussion in the name resolution subgroup about how to resolve identifiers in an inline constraint when the type of the class object prefix is not known (a type parameter or similar) and there is a local binding for the identifier as well. For example: module child (type T = int); T c = new; int x; .... c.randomize() with { y < x }; In this case, there are implementation side issues with determining how to bind "x" and there are user intent issues. By allowing something like: c.randomize() with { y < item.x }; we can clarify that the intended binding is into "c". This opens a possible path for dealing with the implementation side issues -- possible deprecating the unprefixed form or coming up with rules under which the "item." form would be required. That could become a separate discussion once we have a mechanism for directing resolution into the class randomization target. Gord. -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Jun 11 08:45:34 2007
This archive was generated by hypermail 2.1.8 : Mon Jun 11 2007 - 08:45:43 PDT