[Issue 7868] derivedMembers/static if regression
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 9 00:22:30 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7868
--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> 2012-04-09 00:23:12 PDT ---
(In reply to comment #1)
> This line is the problem:
>
> static if (is(B!This)) {
>
> B!This is not a type, and 'is' expressions expect a type. Hence, it is false.
> Replacing it with:
>
> static if (__traits(compiles, B!This)) {
>
> and the example works.
No, this is resolved-invalid forward reference issue.
semantic of C
semantic of mixin A!()
semantic of B!This (== B!C)
semantic of __traits(derivedMembers, T) (T == C)
// forward reference of C!
If remove the line in B:
foreach (name; __traits(derivedMembers, T)) {}
you can compile it.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list