Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
February 14, 2011 [Issue 5574] New: Error: this for ~this needs to be type foo not type foo[1u][1u] | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=5574 Summary: Error: this for ~this needs to be type foo not type foo[1u][1u] Product: D Version: D2 Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: puneet@coverify.org --- Comment #0 from Puneet Goel <puneet@coverify.org> 2011-02-14 06:59:24 PST --- I am using version 2.051 of the dmd compiler. I am getting this error when I am instantiating a struct array with a single element inside another class and only if there is the destructor for the struct is explicitly defined. Is it a known error? Here is a minimized snippet that gives error: $ rdmd --main -unittest test.d Error: this for ~this needs to be type foo not type foo[1u][1u] Error: this for ~this needs to be type foo not type foo[1u] // test.d struct foo { int foofoo; ~this() { // no error if explicit destructor not // defined } } class bar { foo fred; foo[2][2] foofoo; foo[1] frop; // this gives error foo[1][1] fropfrop; // this too } unittest { foo frop; foo[1][1] fropfrop; // this works bar burp; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 20, 2011 [Issue 5574] Struct destructor freaks out when an array of struct with single element is instantiated inside a class | ||||
---|---|---|---|---|
| ||||
Posted in reply to Puneet Goel | http://d.puremagic.com/issues/show_bug.cgi?id=5574 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |k.hara.pg@gmail.com --- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2011-06-19 17:12:10 PDT --- Simple test case: ---- struct foo5574a { ~this() {} } class bar5574a { foo5574a[1] frop; } ---- Postblit has similar problem: ---- struct foo5574b { this(this){} } struct bar5574b { foo5574b[1] frop; } ---- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 20, 2011 [Issue 5574] Struct destructor freaks out when an array of struct with single element is instantiated inside a class | ||||
---|---|---|---|---|
| ||||
Posted in reply to Puneet Goel | http://d.puremagic.com/issues/show_bug.cgi?id=5574 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla@digitalmars.com Resolution| |FIXED --- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2011-06-20 03:19:08 PDT --- https://github.com/D-Programming-Language/dmd/commit/0b04816b04011293388686741f04c285e7efa6d4 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation