[Issue 228] New: Crash on inferring function literal return type with undefined identifier
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 27 09:40:34 PDT 2006
http://d.puremagic.com/issues/show_bug.cgi?id=228
Summary: Crash on inferring function literal return type with
undefined identifier
Product: D
Version: 0.161
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: deewiant at gmail.com
Either of the following pieces of code causes a crash - no internal error
message, a downright "dmd.exe has encountered a problem".
(I'm tagging this as "ice-on-invalid-code" even though there's no ICE, just a
crash.)
--
void main() {
x = function(){};
}
--
void main() {
y = 2;
auto x = function(){};
}
--
The above examples can, of course, be extended: using any undefined identifier
at some point in the code and then, below that, trying to have a function
literal's return type inferred seems to cause this crash.
The error regarding the identifier is correctly reported prior to the crash, so
the problem can be found and fixed easily, and hence this isn't that bad even
though the compiler does crash.
--
More information about the Digitalmars-d-bugs
mailing list