[Issue 14376] New: false positive "Error: one path skips field"
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Mar 29 15:41:55 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14376
Issue ID: 14376
Summary: false positive "Error: one path skips field"
Product: D
Version: unspecified
Hardware: x86_64
OS: Linux
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: ag0aep6g at gmail.com
Fails with "test.d(6): Error: one path skips field x". Should be accepted.
struct ParameterValue
{
typeof(f()) x;
this(int dummy)
{
if(true) this.x = f(); /* line 6 */
else assert(false);
}
}
auto f()
{
return MapResult!(e => 0)();
}
struct MapResult(alias pred)
{
@property int front() {return pred(0);}
}
--
More information about the Digitalmars-d-bugs
mailing list