[Issue 17059] New: [REG 2.072.2] Possible case of wrong circular reference
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Tue Jan  3 19:28:04 PST 2017
    
    
  
https://issues.dlang.org/show_bug.cgi?id=17059
          Issue ID: 17059
           Summary: [REG 2.072.2] Possible case of wrong circular
                    reference
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: b2.temp at gmx.com
The regression appears between 2.072.1 and 2.072.2
test case:
mixin template impl()
{
    import std.traits : BaseClassesTuple;
    alias T = typeof(this);
    enum doImplement = is(T : I) && !(is(BaseClassesTuple!T[0] : I));
    static if (doImplement)
    void method(){}
}
interface I {void method();}
class A : I {mixin impl;}
void main(){}
fails to compile and outputs
/tmp/temp_7F9D9403AD90.d(8,16): Error: circular reference to variable
'runnable.A.impl!().doImplement'
--
    
    
More information about the Digitalmars-d-bugs
mailing list