[FIR] Throw REDECLARATION for duplicated type parameters in declarations

This commit is contained in:
Ivan Kochurkin
2021-08-05 23:38:53 +03:00
committed by Space
parent c19598c2fc
commit 2ca3adbcb2
6 changed files with 63 additions and 26 deletions
@@ -1,6 +1,6 @@
fun <T, T> Pair() {}
fun <<!REDECLARATION!>T<!>, <!REDECLARATION!>T<!>> Pair() {}
class P<T, T> {}
class P<<!REDECLARATION!>T<!>, <!REDECLARATION!>T<!>> {}
val <T, T> T.foo : Int
get() = 1
val <<!REDECLARATION!>T<!>, <!REDECLARATION!>T<!>> T.foo : Int
get() = 1
@@ -1,6 +0,0 @@
interface Test1<T, T>
interface Test2<X, Y, X>
class Outer<T> {
interface TestNested<T>
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
interface Test1<<!REDECLARATION!>T<!>, <!REDECLARATION!>T<!>>
interface Test2<<!REDECLARATION!>X<!>, Y, <!REDECLARATION!>X<!>>