[FIR] Add REPEATED_BOUND, CONFLICTING_UPPER_BOUNDS diagnostics

This commit is contained in:
Andrey Zinovyev
2021-04-09 07:38:39 +00:00
committed by Space
parent 81d4c19d8b
commit 37055c5a09
20 changed files with 132 additions and 94 deletions
+1 -1
View File
@@ -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
-11
View File
@@ -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
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// See KT-9438: Enforce the Single Instantiation Inheritance Rule for type parameters
interface A