KT-4960 Redeclaration is not reported for type parameters of interfaces
When resolving a class body for a class without a primary constructor (e.g., an interface), no checks were performed for redeclarations in the corresponding class header. Creating & initializing a lexical scope of an appropriate kind will do it. Note that since class has no primary constructor, only type parameters could be redeclared (and that's KT-4960).
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Remove type arguments" "true"
|
||||
interface Foo<T, T> {
|
||||
interface Foo<T1, T2> {
|
||||
fun f() {}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Remove type arguments" "true"
|
||||
interface Foo<T, T> {
|
||||
interface Foo<T1, T2> {
|
||||
fun f() {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user