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