[Issue 24061] New: constructor with assert(0) failed to compile
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jul 27 18:15:40 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=24061
Issue ID: 24061
Summary: constructor with assert(0) failed to compile
Product: D
Version: D2
Hardware: All
URL: http://dlang.org/
OS: All
Status: NEW
Severity: normal
Priority: P3
Component: dmd
Assignee: nobody at puremagic.com
Reporter: apz28 at hotmail.com
class E : Exception
{
this(int i) nothrow @safe
{
import std.format;
scope (failure) assert(0, "assume nothrow");
super(format("%d", i), null, 0, null);
}
}
void main()
{
throw new E(1);
}
onlineapp.d(3): Error: constructor `onlineapp.E.this` no match for implicit
`super()` call in constructor
--
More information about the Digitalmars-d-bugs
mailing list