Jonathan Bromley wrote: > I hope this isn't a duplicate - my original message didn't > seem to make it to the reflector. > ... > If you can live with the idea that the presence of "local::" > forces unqualified names to be resolved as if written in a > constraint inside the target class, then there is a remaining > problem of how to write an unambiguous constraint in which > *only* class members participate. The lack of any local:: in > such a constraint would make us lapse back to the > compatibility behaviour, allowing unqualified references to > leak out of the class. I guess you could fix this > (unpleasantly) thus: > > parameter TRUE = 1; > c.randomize() with { x < y; local::TRUE; }; > > ~~~~~~~~~~~~~~~~~~~~~~~~ > > As a convenience feature, I would also suggest that > *anything* with a local:: qualifier should be treated as a > state variable for the constraint, so that (as I suggested in > an earlier post) > > c.randomize() with {x != local::c.x;}; > > would unambiguously mean "randomize c.x so that it gets a > value different from its present value". This would be a nice convenience. However, it would be better if this feature was also available in a regular constraint (inside the class) rather than just in inline-constraints. - Ray -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Nov 8 08:22:04 2007
This archive was generated by hypermail 2.1.8 : Thu Nov 08 2007 - 08:22:28 PST