I'm getting an ICE with the attached code (reduced by the amazing DustMite). It has to do with building a delegate literal. I'm working on building a mock objects framework inspired by Mockito. DustMite reduced the code enough that it's a bit nonsensical in the attachment, but it does reveal the error.
Found in DMD 2.060 on Mac OSX Mountain Lion.
Comment #1 by gileadis — 2012-09-12T07:57:48Z
Created attachment 1144
Code that reveals the bug.
Comment #2 by bearophile_hugs — 2012-09-12T09:29:42Z
Further manual reduction:
template TypeTuple(TList...) {
alias TList TypeTuple;
}
void main() {
alias TypeTuple!(int) Foo;
int bar;
Foo args = cast(Foo)bar;
}