Summary: Regression(2.059): typeof(this) incorrect in mixin
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD

--- Comment #0 from Vladimir Panteleev <> 2012-03-15 
17:05:19 PDT ---
template IsValid(T)
    enum IsValid = is(typeof(T.init.x));

mixin template T()
    static assert(IsValid!(typeof(this)));

struct S
    int x;
    mixin T;

The IsValid template is not necessary to reproduce the problem - it's for

This also fails:
    static assert(is(typeof(typeof(this).init.x)));
But not this:
    static assert(is(typeof(x)));

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to