Skip to content

Commit ee73b78

Browse files
committed
Test for #2288
1 parent d7f4d8d commit ee73b78

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/test/run-pass/issue-2288.rs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
iface clam<A: copy> {
2+
fn chowder(y: A);
3+
}
4+
class foo<A: copy> : clam<A> {
5+
let x: A;
6+
new(b: A) { self.x = b; }
7+
fn chowder(y: A) {
8+
}
9+
}
10+
11+
fn f<A: copy>(x: clam<A>, a: A) {
12+
x.chowder(a);
13+
}
14+
15+
fn main() {
16+
17+
let c = foo(42);
18+
let d: clam<int> = c as clam::<int>;
19+
f(d, c.x);
20+
}

0 commit comments

Comments
 (0)