Bug 651 – Assertion failure: 'global.errors' on line 2622 in file 'template.c'
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-12-05T02:36:00Z
Last change time
2014-02-15T13:19:12Z
Assigned to
bugzilla
Creator
kinaba
Comments
Comment #0 by kinaba — 2006-12-05T02:36:23Z
The following program, forwarding an alias tuple to another
template, casues abnormal compiler termination:
// discovered by shinichiro.h
void f() {}
template foo(T) {}
template bar(T...){ alias foo!(T) buz; }
alias bar!(f) a;
which prints:
Assertion failure: 'global.errors' on line 2622 in file 'template.c'
abnormal program termination
Here's my experiment of replacing "void f() {}" to other statements:
- import f : same assertion failure
- class f {} : ok
- int f : ok
- const f = 1 : ok
So it is a problem of alias tuples?
Comment #1 by thomas-dloop — 2006-12-10T11:06:06Z
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[email protected] schrieb am 2006-12-05:
> http://d.puremagic.com/issues/show_bug.cgi?id=651
> The following program, forwarding an alias tuple to another
> template, casues abnormal compiler termination:
>
> // discovered by shinichiro.h
> void f() {}
> template foo(T) {}
> template bar(T...){ alias foo!(T) buz; }
> alias bar!(f) a;
>
> which prints:
>
> Assertion failure: 'global.errors' on line 2622 in file 'template.c'
>
> abnormal program termination
>
> Here's my experiment of replacing "void f() {}" to other statements:
> - import f : same assertion failure
> - class f {} : ok
> - int f : ok
> - const f = 1 : ok
> So it is a problem of alias tuples?
Added to DStress as
http://dstress.kuehne.cn/nocompile/b/bug_template_2622_A.dhttp://dstress.kuehne.cn/nocompile/b/bug_template_2622_B.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFFfDujLK5blCcjpWoRAq96AJwM7x3xxGXAKh1v91L4xHIxomaDjwCeIL6j
vNsxKjmm9dw0A3oZRf2suKQ=
=XC2R
-----END PGP SIGNATURE-----