You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found while working on DMD itself, which uses extern(C++) classes for its AST.
extern(C++) classC
{
invariant { assert(0); }
voidf() {}
}
voidmain()
{
auto c = new C();
c.f();
}
Expected behavior: the same as you get when you change it to extern(D) class C: Assertion failure
Actual behavior: the program runs, exits with status 0
Found while working on DMD itself, which uses
extern(C++)
classes for its AST.Expected behavior: the same as you get when you change it to
extern(D) class C
: Assertion failureActual behavior: the program runs, exits with status 0
If this is intentional, it should be documented somewhere. Either in https://dlang.org/spec/class.html#invariants or https://dlang.org/dmd-linux.html#switch-check if it's considered an implementation detail.
The text was updated successfully, but these errors were encountered: