[Issue 228] New: Crash on inferring function literal return type with undefined identifier

Thomas Kuehne thomas-dloop at kuehne.cn
Thu Jun 29 06:35:30 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail at puremagic.com schrieb am 2006-06-27:
> http://d.puremagic.com/issues/show_bug.cgi?id=228

> 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.

Added to DStress as
http://dstress.kuehne.cn/nocompile/d/delegate_18_A.d
http://dstress.kuehne.cn/nocompile/d/delegate_18_B.d
http://dstress.kuehne.cn/nocompile/f/function_08_A.d
http://dstress.kuehne.cn/nocompile/f/function_08_B.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFEo7wR3w+/yD4P9tIRAo0GAJ40r9BS+p+Kykqd4rcmRn31CBUSwQCeL3s2
cj7lBhrmkU6tgqbQA05YTx4=
=oeMw
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list