2011-09-02 10:39:05 -07:00
|
|
|
// Tests that shapes respect linearize_ty_params().
|
|
|
|
|
|
|
|
tag option<T> {
|
|
|
|
none;
|
|
|
|
some(T);
|
|
|
|
}
|
|
|
|
|
|
|
|
type smallintmap<T> = @{mutable v: [mutable option<T>]};
|
|
|
|
|
2011-10-25 15:56:55 +02:00
|
|
|
fn mk<T>() -> smallintmap<T> {
|
2011-09-02 10:39:05 -07:00
|
|
|
let v: [mutable option<T>] = [mutable];
|
|
|
|
ret @{mutable v: v};
|
|
|
|
}
|
|
|
|
|
2011-10-25 15:56:55 +02:00
|
|
|
fn f<T,U>() {
|
2011-09-02 10:39:05 -07:00
|
|
|
let sim = mk::<U>();
|
2011-12-22 14:42:52 -08:00
|
|
|
log_full(core::error, sim);
|
2011-09-02 10:39:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
f::<int,int>();
|
|
|
|
}
|
|
|
|
|