2011-06-15 11:19:50 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-23 21:03:09 -07:00
|
|
|
// -*- rust -*-
|
|
|
|
|
|
|
|
// Issue #45: infer type parameters in function applications
|
2012-08-01 17:30:05 -07:00
|
|
|
fn id<T: copy>(x: T) -> T { return x; }
|
2010-06-23 21:03:09 -07:00
|
|
|
|
2011-08-12 06:37:25 -07:00
|
|
|
fn main() { let x: int = 42; let y: int = id(x); assert (x == y); }
|