[FIR] Rework resolution of declaration statuses
There is introduced algorithm of resolution with jumps: before resolution of some class we resolve all status of members of its supertypes, so we can properly determine inherited visibility and modifiers
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
// ISSUE: KT-38656
|
||||
|
||||
// FILE: B.kt
|
||||
|
||||
class B : A() {
|
||||
override fun foo(s: String): String = ""
|
||||
|
||||
fun testProtected(): String {
|
||||
return this foo "hello"
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: A.kt
|
||||
|
||||
abstract class A {
|
||||
protected abstract infix fun foo(s: String): String
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun test(b: B): String {
|
||||
return b <!HIDDEN!>foo<!> "hello" // should be an error
|
||||
}
|
||||
Reference in New Issue
Block a user