Implement trait inheritance for bounded type parameters
This commit is contained in:
parent
daa89e0861
commit
78ee821154
38 changed files with 1004 additions and 176 deletions
|
|
@ -0,0 +1,23 @@
|
|||
// xfail-test
|
||||
// error-pattern: what
|
||||
|
||||
trait Foo {
|
||||
fn f();
|
||||
}
|
||||
|
||||
trait Bar : Foo {
|
||||
fn g();
|
||||
}
|
||||
|
||||
struct A {
|
||||
x: int
|
||||
}
|
||||
|
||||
// Can't implement Bar without an impl of Foo
|
||||
impl A : Bar {
|
||||
fn g() { }
|
||||
}
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue