2011-09-02 10:39:05 -07:00
|
|
|
// Tests that shapes respect linearize_ty_params().
|
|
|
|
|
2012-01-19 16:10:31 -08:00
|
|
|
enum option<T> {
|
2012-01-19 18:31:08 -08:00
|
|
|
none,
|
|
|
|
some(T),
|
2011-09-02 10:39:05 -07:00
|
|
|
}
|
|
|
|
|
2012-06-29 16:26:56 -07:00
|
|
|
type smallintmap<T> = @{mut v: ~[mut option<T>]};
|
2011-09-02 10:39:05 -07:00
|
|
|
|
2011-10-25 15:56:55 +02:00
|
|
|
fn mk<T>() -> smallintmap<T> {
|
2012-06-29 16:26:56 -07:00
|
|
|
let v: ~[mut option<T>] = ~[mut];
|
2012-09-18 22:45:24 -07:00
|
|
|
return @{mut v: move v};
|
2011-09-02 10:39:05 -07:00
|
|
|
}
|
|
|
|
|
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 17:53:53 -08:00
|
|
|
log(error, sim);
|
2011-09-02 10:39:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
f::<int,int>();
|
|
|
|
}
|
|
|
|
|