Bug 14409 – false positive "Error: one path skips constructor"
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-04-05T05:34:00Z
Last change time
2015-06-17T21:04:21Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2015-04-05T05:34:48Z
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
Comment #1 by dlang-bugzilla — 2015-04-05T05:37:06Z