Closed
Description
Testcase:
fn foo<T>(a: T) -> T { a }
static BLOCK_FN_INFERRED: fn(uint) -> uint = foo;
fn main() {}
The intend here is to let rustc infer the right instantiation of foo
, which would be foo::<uint>
.
Output (warnings trimmed):
error: internal compiler error: fictitious type ty_param(middle::ty::param_ty{idx: 0u, def_id: syntax::ast::DefId{krate: 0u32, node: 11u32}}) in sizing_type_of()
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at '~Any', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:155