Closed
Description
These basically don't work well together. The following works:
pub trait Bar {
type B;
}
pub trait Foo: Bar<A=int> {
type A;
}
The following gives an error (the wrong error too), but should compile:
pub trait Bar {
type B;
}
pub trait Foo: Bar {
type A;
}
In this case, B
should be treated like an associated type on Foo
.
I am not sure if type B = int
or even type B: Baz
should be allowed in Foo
, but I assume not (at least for now).
When the above works, we should require super trait associated types are given in type bindings, e.g., Foo<A=int, B=int>
.
We should also allow Self::B
in the body of Foo
and if type T
has bound Foo
, then we should allow T::B
.