Add test cases for issue 2445

This commit is contained in:
Tim Chevalier 2012-06-25 13:16:47 -07:00
parent fad307d7b4
commit fe9bbeca1a
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,18 @@
class c1<T: copy> {
let x: T;
new(x: T) {self.x = x;}
fn f1(x: int) {
}
}
impl i1<T: copy> for c1<T> {
fn f2(x: int) {
}
}
fn main() {
c1::<int>(3).f1(4);
c1::<int>(3).f2(4);
}

View file

@ -0,0 +1,18 @@
import dvec::dvec;
class c1<T: copy> {
let x: T;
new(x: T) {self.x = x;}
fn f1(x: T) {}
}
impl i1<T: copy> for c1<T> {
fn f2(x: T) {}
}
fn main() {
c1::<int>(3).f1(4);
c1::<int>(3).f2(4);
}