When compiling:
class A {
void method(char[] f) {}
}
static this() {
(new A).method!()("foo");
}
with
LLVM D Compiler rev. 1255:9014d7f0433f (2009-04-22 03:08 +0200)
based on DMD v1.042 and llvm 2.5 (2009-03-03 04:36:03 +0000)
on linux x86-64, I get the following assertion:
ldc: /home/robert/d/comp/ldc/gen/toir.cpp:1172: virtual DValue* ThisExp::toElem(IRState*): Assertion `v' failed.
0 ldc 0x0000000000cecdd1
1 libc.so.6 0x00007f6dde202150
2 libc.so.6 0x00007f6dde2020c5 gsignal + 53
3 libc.so.6 0x00007f6dde2035e3 abort + 387
4 libc.so.6 0x00007f6dde1fb0e9 __assert_fail + 233
5 ldc 0x000000000064722e ThisExp::toElem(IRState*) + 366
6 ldc 0x000000000064c1a2 AssertExp::toElem(IRState*) + 98
7 ldc 0x00000000006373f6 ExpStatement::toIR(IRState*) + 86
8 ldc 0x0000000000637249 CompoundStatement::toIR(IRState*) + 89
9 ldc 0x0000000000615683 DtoDefineFunction(FuncDeclaration*) + 1763
10 ldc 0x00000000006642e9 Ir::emitFunctionBodies() + 57
11 ldc 0x000000000065e7f9 Module::genLLVMModule(Ir*) + 633
12 ldc 0x000000000062396b main + 4891
13 libc.so.6 0x00007f6dde1ee546 __libc_start_main + 230
14 ldc 0x0000000000546e39