opendlang / opend

Boost Software License 1.0
89 stars 20 forks source link

`@implicit this` causes compiler crash #81

Closed GrimMaple closed 2 weeks ago

GrimMaple commented 2 weeks ago

Provided minimal example causes a compiler crash with the following message: Exception Code: 0xC00000FD

If a this(ref A other) constructor is removed, the code compiles. I suspect the compiler is unable to identify what constructor to use, as they both fit for o = new Object();

struct A
{
    @implicit this(Object t) { }

    this(ref A other) { }
}
class Z
{
    A o = new Object();;
}
adamdruppe commented 2 weeks ago

ok i see the cause, the code that checks for implicit things is wrongly triggered here and sends it down infinite recursion

have a hack fix ready will see about posting a real fix later today.

adamdruppe commented 2 weeks ago

this should be fixed in the latest build

GrimMaple commented 2 weeks ago

Confirmed working