Test for #2288
This commit is contained in:
parent
d7f4d8d12b
commit
ee73b78e04
20
src/test/run-pass/issue-2288.rs
Normal file
20
src/test/run-pass/issue-2288.rs
Normal file
@ -0,0 +1,20 @@
|
||||
iface clam<A: copy> {
|
||||
fn chowder(y: A);
|
||||
}
|
||||
class foo<A: copy> : clam<A> {
|
||||
let x: A;
|
||||
new(b: A) { self.x = b; }
|
||||
fn chowder(y: A) {
|
||||
}
|
||||
}
|
||||
|
||||
fn f<A: copy>(x: clam<A>, a: A) {
|
||||
x.chowder(a);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
let c = foo(42);
|
||||
let d: clam<int> = c as clam::<int>;
|
||||
f(d, c.x);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user