June 15, 2017 [Issue 17506] New: [REG2.075] @disable constructor requires members to be initialized | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=17506 Issue ID: 17506 Summary: [REG2.075] @disable constructor requires members to be initialized Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: greensunny12@gmail.com 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 -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply