KT-286 Check supertype lists (in progress)

Consistency for type arguments in the supertype list
This commit is contained in:
Andrey Breslav
2011-09-13 20:27:44 +04:00
parent 78a51bd9c4
commit 8ee1096e37
6 changed files with 177 additions and 14 deletions
@@ -0,0 +1,42 @@
trait A<in T> {}
trait B<T> : A<Int> {}
trait C<T> : <error>B<T>, A<T></error> {}
trait C1<T> : B<T>, A<Any> {}
trait D : <error>C<Boolean>, B<Double></error>{}
trait A1<out T> {}
trait B1 : A1<Int> {}
trait B2 : A1<Any>, B1 {}
trait BA1<T> {}
trait BB1 : BA1<Int> {}
trait BB2 : <error>BA1<Any>, BB1</error> {}
namespace x {
trait AA1<out T> {}
trait AB1 : AA1<Int> {}
trait AB3 : AA1<Comparable<Int>> {}
trait AB2 : AA1<Number>, AB1, AB3 {}
}
namespace x2 {
trait AA1<out T> {}
trait AB1 : AA1<Any> {}
trait AB3 : AA1<Comparable<Int>> {}
trait AB2 : <error>AA1<Number>, AB1, AB3</error> {}
}
namespace x3 {
trait AA1<in T> {}
trait AB1 : AA1<Any> {}
trait AB3 : AA1<Comparable<Int>> {}
trait AB2 : AA1<Number>, AB1, AB3 {}
}
namespace sx2 {
trait AA1<in T> {}
trait AB1 : AA1<Int> {}
trait AB3 : AA1<Comparable<Int>> {}
trait AB2 : <error>AA1<Number>, AB1, AB3</error> {}
}
@@ -3,4 +3,4 @@ trait B<T> {}
trait C<T> {}
trait D<T> {}
trait Test : A<<error>in</error> Int>, B<<error>out</error> T>, C<<error>*</error>><error>?</error><error>?</error><error>?</error>, D<Int> {}
trait Test : A<<error>in</error> Int>, B<<error>out</error> Int>, C<<error>*</error>><error>?</error><error>?</error><error>?</error>, D<Int> {}