https://d.puremagic.com/issues/show_bug.cgi?id=12287
--- Comment #11 from Vladimir Panteleev <[email protected]> 2014-03-03 05:03:05 EET --- (In reply to comment #10) > But, latter semantic analysis will translate X!foo to X!foo.X again. The > behavior is not directly related to the __traits(parent) behavior. The __traits code runs semantic on its result immediately after calculating the parent. So "later" here means "immediately after". > I think it's not consistent behavior in generic case. For example: > > template S(T) > { > struct S {} > > int x; > static assert(__traits(isSame, __traits(parent, S), > __traits(parent, x))); > } > alias s = S!int; > > Your change will break this case. I think that makes no sense. In the same spirit, you could argue that since the parent of x is struct S, then x is a member of struct S. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
