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
This commit is contained in:
Alexander Udalov
2014-04-14 18:32:03 +04:00
parent 1706bd4a00
commit 3c3d120004
5 changed files with 40 additions and 13 deletions
@@ -7,7 +7,7 @@ interface JavaInterface {
// FILE: kotlin.kt
trait KotlinTrait {
fun foo(someOtherName: Int) {}
public fun foo(someOtherName: Int) {}
}
class BothTraitsSubclass : JavaInterface, KotlinTrait