2012-07-31 12:27:51 -05:00
|
|
|
trait bar { fn dup() -> self; fn blah<X>(); }
|
2012-08-07 20:10:06 -05:00
|
|
|
impl int: bar { fn dup() -> int { self } fn blah<X>() {} }
|
|
|
|
impl uint: bar { fn dup() -> uint { self } fn blah<X>() {} }
|
2012-02-10 06:31:33 -06:00
|
|
|
|
|
|
|
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
|
|
|
}
|