[Issue 15515] New: default construction disabled for struct constructor with default arguments
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Jan 4 11:41:05 PST 2016
https://issues.dlang.org/show_bug.cgi?id=15515
Issue ID: 15515
Summary: default construction disabled for struct constructor
with default arguments
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: code at dawg.eu
cat > bug.d << EOF
struct S {
this(string r = ".") {
}
}
void test() {
S s;
}
EOF
dmd -c bug
----
bug.d(7): Error: variable bug.test.s default construction is disabled for type
S
----
This was turned into an error between 2.069.2 and 2.070.0 without any
deprecation step.
--
More information about the Digitalmars-d-bugs
mailing list