Bug 402 – compiler crash with mixin and forward reference
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-10-05T19:13:00Z
Last change time
2014-02-15T13:19:56Z
Keywords
ice-on-invalid-code
Assigned to
bugzilla
Creator
digitalmars-com
Comments
Comment #0 by digitalmars-com — 2006-10-05T19:13:46Z
The following may be incorrect code, but it crashes the compiler.
>dmd -c issue.d
issue.d(8): mixin Foo!(y) cannot resolve forward reference
***** Crash *****
----- issue.d -----
template Foo(alias b)
{
int a() { return b; }
}
void main()
{
mixin Foo!(y) y;
}
Comment #1 by thomas-dloop — 2006-10-06T02:10:36Z
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[email protected] schrieb am 2006-10-06:
> http://d.puremagic.com/issues/show_bug.cgi?id=402
> The following may be incorrect code, but it crashes the compiler.
>
>>dmd -c issue.d
> issue.d(8): mixin Foo!(y) cannot resolve forward reference
> ***** Crash *****
>
> ----- issue.d -----
> template Foo(alias b)
> {
> int a() { return b; }
> }
>
> void main()
> {
> mixin Foo!(y) y;
> }
Added to DStress as
http://dstress.kuehne.cn/nocompile/a/alias_39_A.dhttp://dstress.kuehne.cn/nocompile/a/alias_39_B.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFFJgd8LK5blCcjpWoRAqsiAJ4k1BmBv/BEl95EbKk1Cp1uCvkKiACfX+Gy
5sr7FO3j1L4vAqhazLtL+Ik=
=/INU
-----END PGP SIGNATURE-----