rust/src/test/run-pass/log-linearized.rs

24 lines
335 B
Rust
Raw Normal View History

// Tests that shapes respect linearize_ty_params().
enum option<T> {
none,
some(T),
}
2012-03-26 20:35:18 -05:00
type smallintmap<T> = @{mut v: [mut option<T>]};
fn mk<T>() -> smallintmap<T> {
2012-03-26 20:35:18 -05:00
let v: [mut option<T>] = [mut];
ret @{mut v: v};
}
fn f<T,U>() {
let sim = mk::<U>();
log(error, sim);
}
fn main() {
f::<int,int>();
}