January 11, 2009 [Issue 2578] New: Compiler crashes when type is passed to writefln() | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=2578 Summary: Compiler crashes when type is passed to writefln() Product: D Version: 2.023 Platform: PC OS/Version: Windows Status: NEW Keywords: ice-on-invalid-code Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: snake.scaly@gmail.com To reproduce, compile this: import std.stdio; struct Foo {} void main() { writefln(Foo); } The DMD crashes with access violation (read address 0x00000000) -- |
April 03, 2009 [Issue 2578] Compiler crashes when type is passed to writefln() | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2578 clugdbug@yahoo.com.au changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME ------- Comment #1 from clugdbug@yahoo.com.au 2009-04-03 01:58 ------- Works for me, Windows DMD 1.042 and DMD2.027. DMD2.027 doesn't refer to the source file which contained the error, but I think that's normal behaviour and a quite different Phobos issue (Phobos doesn't accept structs without toString(). c:\dmd\windows\bin\..\..\src\phobos\std\format.d(2050): Error: no property 'toSt ring' for type 'Foo' c:\dmd\windows\bin\..\..\src\phobos\std\format.d(2051): Error: template std.stdi o.PrivateFileWriter!(char).PrivateFileWriter.write(C) does not match any functio n template declaration c:\dmd\windows\bin\..\..\src\phobos\std\format.d(2051): Error: template std.stdi o.PrivateFileWriter!(char).PrivateFileWriter.write(C) cannot deduce template fun ction from argument types !()(int) c:\dmd\windows\bin\..\..\src\phobos\std\format.d(2133): Error: template instance std.format.formatGeneric!(PrivateFileWriter!(char),Foo) error instantiating -- |
Copyright © 1999-2021 by the D Language Foundation