[Issue 2681] New: ICE trying to print struct w/ no toString() method.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 21 19:43:55 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2681
Summary: ICE trying to print struct w/ no toString() method.
Product: D
Version: 2.025
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: diagnostic, ice-on-invalid-code
Severity: major
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: dsimcha at yahoo.com
import std.stdio;
struct Foo {
float num;
}
void main() {
Foo[] fooArray;
writeln(fooArray);
}
This code causes the compiler to core dump without displaying its expected
error messages. Marking as major because this is the kind of thing that can be
very frustrating for a user to debug.
Also possibly of interest is that changing the type of fooArray from Foo[] to
Foo makes the compiler segfault _after_ displaying its error message.
--
More information about the Digitalmars-d-bugs
mailing list