Fix annoying parameter name override warning
Some corner cases still remain: KotlinSignature, propagation, deserialized delegates to Java interfaces #KT-1239 Obsolete #KT-1924 In Progress #KT-2081 Fixed
This commit is contained in:
+1
-1
@@ -7,8 +7,8 @@ trait D {
|
||||
}
|
||||
|
||||
trait <!DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES!>E<!> : C, D
|
||||
trait F : C, D {
|
||||
|
||||
trait F : C, D {
|
||||
override fun foo(<!PARAMETER_NAME_CHANGED_ON_OVERRIDE!>a<!> : Int) {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// FILE: Super.java
|
||||
|
||||
interface Super {
|
||||
void foo(long superName);
|
||||
}
|
||||
|
||||
// FILE: Sub.java
|
||||
|
||||
interface Sub extends Super {
|
||||
}
|
||||
|
||||
// FILE: SubSub.kt
|
||||
|
||||
class SubSub : Sub {
|
||||
override fun foo(subName: Long) {}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// FILE: JavaInterface.java
|
||||
|
||||
interface JavaInterface {
|
||||
void foo(int javaName);
|
||||
}
|
||||
|
||||
// FILE: kotlin.kt
|
||||
|
||||
trait KotlinTrait {
|
||||
fun foo(someOtherName: Int) {}
|
||||
}
|
||||
|
||||
class BothTraitsSubclass : JavaInterface, KotlinTrait
|
||||
@@ -0,0 +1,18 @@
|
||||
// FILE: JavaInterface.java
|
||||
|
||||
interface JavaInterface {
|
||||
void foo(int javaName);
|
||||
}
|
||||
|
||||
// FILE: kotlin.kt
|
||||
|
||||
class SimpleSubclass : JavaInterface {
|
||||
override fun foo(kotlinName: Int) {}
|
||||
}
|
||||
|
||||
|
||||
trait SubtraitWithFakeOverride : JavaInterface
|
||||
|
||||
class Subclass : SubtraitWithFakeOverride {
|
||||
override fun foo(otherKotlinName: Int) {}
|
||||
}
|
||||
Reference in New Issue
Block a user