Comment #0 by bus_dbugzilla — 2009-04-23T00:56:38Z
main.d:
-----------
template foo(T)
{
}
pragma(msg, foo!(typeof(bar)));
public void bar()
{
}
-----------
> dmd main.d
Assertion failure: 'global.errors' on line 3773 in file 'template.c'
Comment #1 by clugdbug — 2009-04-24T03:08:53Z
*** Bug 2253 has been marked as a duplicate of this bug. ***
Comment #2 by clugdbug — 2009-04-24T03:13:35Z
The original test case isn't actually valid, here's a slightly longer example which is valid. Fails on D2.029 as well.
---
template Foo( T ) { alias int Foo;}
Foo!(typeof(bar)) x;
void bar() { }
Comment #3 by clugdbug — 2009-05-14T05:14:21Z
This code from issue 884 (exactly 2000 bugs earlier) creates the same ICE error message.
It may or may not be a duplicate; I'm putting it here so that 884 can be closed.
------
template Inner(Ts...) {
const Inner = .Inner!((Ts));
}
auto x = Inner!();