Files
kotlin-fork/compiler/testData/compileKotlinAgainstCustomBinaries/noWarningsOnJavaKotlinInheritance/noWarningsOnJavaKotlinInheritance.kt
T
Alexander Udalov 3c3d120004 Prohibit implicit overrides with lesser visibility
A non-abstract super-declaration is allowed to stand as 'an implementation' of
a fake override only if its visibility is not less than visibilities of all
other super-declarations

 #KT-2491 Fixed
2014-05-22 19:32:10 +04:00

15 lines
424 B
Kotlin

// Simple inheritance. Checks that there's no PARAMETER_NAME_CHANGED_ON_OVERRIDE warning
class SimpleSubclass : JavaInterface {
override fun foo(kotlinName: Int) {}
}
// Class extends both Java and Kotlin traits. Checks that there's no DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES warning
trait KotlinTrait {
public fun foo(someOtherName: Int) {}
}
class BothTraitsSubclass : JavaInterface, KotlinTrait