[FIR] Add REPEATED_BOUND, CONFLICTING_UPPER_BOUNDS diagnostics
This commit is contained in:
+1
-1
@@ -42,7 +42,7 @@ class Bar<T : Foo>
|
||||
class Buzz<T> where T : Bar<Int>, T : <error descr="[UNRESOLVED_REFERENCE] Unresolved reference: nioho">nioho</error>
|
||||
|
||||
class X<T : Foo>
|
||||
class Y<T> where T : Foo, T : <error descr="[ONLY_ONE_CLASS_BOUND_ALLOWED] Only one of the upper bounds can be a class">Bar<Foo></error>
|
||||
class Y<<error descr="[CONFLICTING_UPPER_BOUNDS] Upper bounds of T have empty intersection">T</error>> where T : Foo, T : <error descr="[ONLY_ONE_CLASS_BOUND_ALLOWED] Only one of the upper bounds can be a class">Bar<Foo></error>
|
||||
|
||||
fun <T> test2(t : T)
|
||||
where
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
// See KT-9438: Enforce the Single Instantiation Inheritance Rule for type parameters
|
||||
|
||||
interface A
|
||||
|
||||
interface B
|
||||
|
||||
interface D<T>
|
||||
|
||||
interface CorrectF<T> where T : D<A>, T : D<B>
|
||||
|
||||
fun <T> bar() where T : D<A>, T : D<B> {}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// See KT-9438: Enforce the Single Instantiation Inheritance Rule for type parameters
|
||||
|
||||
interface A
|
||||
|
||||
Reference in New Issue
Block a user