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:
Alexander Udalov
2014-03-12 01:30:42 +04:00
parent 80a374a6e4
commit 7fcd42f40c
16 changed files with 198 additions and 15 deletions
@@ -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) {}
}
@@ -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) {}
}