[Issue 17059] [REG 2.072.2] Possible case of wrong circular reference

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jan 7 10:14:27 PST 2017


https://issues.dlang.org/show_bug.cgi?id=17059

Martin Nowak <code at dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code at dawg.eu

--- Comment #2 from Martin Nowak <code at dawg.eu> ---
cat > bug.d << CODE
mixin template impl()
{
    alias T = typeof(this);
    enum doImplement = is(T : I) ;

    static if (doImplement)
    {}
}

interface I {}
class A : I {mixin impl;}
CODE

dmd -c -o- bug
----
bug.d(6): Error: circular reference to variable 'bug.A.impl!().doImplement'
bug.d(11): Error: mixin bug.A.impl!() error instantiating
----

> If i trust a bisect made by hand, the fix for issue 16980 is the culprit, so this pull: https://github.com/dlang/dmd/pull/6383

Digger confirms that it was introduced with
https://github.com/dlang/dmd/pull/6383.

--


More information about the Digitalmars-d-bugs mailing list