D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17506 - [REG2.075] @disable constructor requires members to be initialized
Summary: [REG2.075] @disable constructor requires members to be initialized
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-15 00:22 UTC by Seb
Modified: 2017-08-07 13:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Seb 2017-06-15 00:22:39 UTC
cat > main.d << CODE
struct TreeMap
{
	this() @disable;
	this(TTree tree) { this.tree = tree; }
	TTree tree;
}

struct TTree
{
	this() @disable;
	this(int foo) {}
	~this() {}
}

void main()
{
    auto k = TreeMap(TTree(1));
}
CODE

$ main.d
treemap.d(3): Error: field tree must be initialized in constructor
Comment 1 github-bugzilla 2017-06-17 10:16:18 UTC
Commit pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/558773e64d42d56ad02970adfdc1371311ca3291
add test cases for existing production code

- fixes Issues 17494, 17505, 17506
Comment 2 github-bugzilla 2017-08-07 13:16:49 UTC
Commit pushed to newCTFE at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/558773e64d42d56ad02970adfdc1371311ca3291
add test cases for existing production code