[Issue 3569] New: DMD Stack Overflow with a struct member function inside a C-style struct initializer
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Dec 3 13:45:03 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3569
Summary: DMD Stack Overflow with a struct member function
inside a C-style struct initializer
Product: D
Version: 2.036
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: ice-on-valid-code
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: sandford at jhu.edu
--- Comment #0 from Rob Jacques <sandford at jhu.edu> 2009-12-03 13:45:02 PST ---
This is a regression between DMD 2.035 and DMD 2.036. Here is a simplified test
case:
struct Foo {
Foo bar() { return this; }
}
struct Bar {
Foo foo;
Bar opCom() {
Bar r = { foo.bar() }; // Error caused by this line
return r;
}
}
The simple work around is to use D style constructors: Bar r = ( foo.bar() );
or to set the fields manually. However, tracking these down is very difficult
because there is no line number nor easy find/replace.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list