ldc-developers/ldc — Issue #68: ICE on Associative Array Of Delegate Literals
Author: dsimcha
Created: 2012-01-21 23:45:46+00:00
State: open

void main() {
auto randFuncs = [
"normal" : () { } ];
}

$ ldc2 test.d
ldc2: Constants.cpp:606: static llvm::Constant* llvm::ConstantArray::get(llvm::ArrayType*, llvm::ArrayRef): Assertion `V[i]->getType() == Ty->getElementType() && "Wrong type in array element initializer"' failed.
0 ldc2 0x0000000001009f4f
1 ldc2 0x000000000100a439
2 libpthread.so.0 0x00007f9cfcf3e030
3 libc.so.6 0x00007f9cfc026405 gsignal + 53
4 libc.so.6 0x00007f9cfc029680 abort + 384
5 libc.so.6 0x00007f9cfc01f5b1 __assert_fail + 241
6 ldc2 0x0000000000f24a4c
7 ldc2 0x00000000006dfc90 AssocArrayLiteralExp::toElem(IRState*) + 1120
8 ldc2 0x00000000006d4ed1 AssignExp::toElem(IRState*) + 193
9 ldc2 0x00000000006a9a94 DtoDeclarationExp(Dsymbol*) + 644
10 ldc2 0x00000000006d2c81 DeclarationExp::toElem(IRState*) + 65
11 ldc2 0x00000000006d2bc4 Expression::toElemDtor(IRState*) + 68
12 ldc2 0x00000000007280ea ExpStatement::toIR(IRState*) + 90
13 ldc2 0x000000000072794e CompoundStatement::toIR(IRState*) + 94
Aborted