[Issue 14409] New: false positive "Error: one path skips constructor"
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Apr 4 22:34:48 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14409
Issue ID: 14409
Summary: false positive "Error: one path skips constructor"
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: rejects-valid
Severity: major
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: k.hara.pg at gmail.com
Test case:
class B { this(int) {} }
class C : B
{
this(int n)
{
if (true) // line 6
super(n);
else
assert(0);
}
}
Output:
test.d(6): Error: one path skips constructor
test.d(4): Error: return without calling constructor
--
More information about the Digitalmars-d-bugs
mailing list