2012-07-31 12:27:51 -05:00
|
|
|
trait bar { fn dup() -> self; fn blah<X>(); }
|
2012-02-10 06:31:33 -06:00
|
|
|
impl of bar for int { fn dup() -> int { self } fn blah<X>() {} }
|
|
|
|
impl of bar for uint { fn dup() -> uint { self } fn blah<X>() {} }
|
|
|
|
|
|
|
|
fn main() {
|
2012-06-30 06:23:59 -05:00
|
|
|
10.dup::<int>(); //~ ERROR does not take type parameters
|
|
|
|
10.blah::<int, int>(); //~ ERROR incorrect number of type parameters
|
2012-08-07 11:45:32 -05:00
|
|
|
(10 as bar).dup(); //~ ERROR contains a self-type
|
2012-02-10 06:31:33 -06:00
|
|
|
}
|