D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15551 - default construction disabled with default arguments
Summary: default construction disabled with default arguments
Status: RESOLVED DUPLICATE of issue 15500
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 regression
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-11 08:41 UTC by wikodes
Modified: 2016-03-29 22:23 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description wikodes 2016-01-11 08:41:28 UTC
Working with dmd.2.069.2
Fail with nightly build 2016-01-11.

----
cat > bug.d << EOF
struct S {
    this(string r = ".") {
    }
}

void test() {
    S ok();
    S err;
}
EOF

dmd -c bug.d
----
./bug.d(41): Error: variable bug.test.err default construction is disabled for type S
----
Comment 1 Martin Nowak 2016-03-29 22:23:46 UTC

*** This issue has been marked as a duplicate of issue 15500 ***