mozilla/rust — Issue #1901: Unreachable generic array concat breaks trans
Author: jruderman
Created: 2012-02-25 10:24:44+00:00
State: open

Testcase 1:

fn f(a: T) {
fail + [a]
}
fn main() {}

Testcase 2:

fn f(g: fn() -> [T]) {
let r = fail;
r += g();
}
fn main() {}

Both trigger:

Assertion failed: (isa(Val) && "cast() argument of incompatible type!"), function cast, file /Users/jruderman/code/rust/src/llvm/include/llvm/Support/Casting.h, line 194.