FIR: Refine visibility check for private methods defined in a class
- use-site should be contained within the class that owns callee symbol - class-representative of dispatch receiver value should be exactly the same as a container class of a callee (not its subtype)
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// SKIP_TXT
|
||||
|
||||
abstract class A {
|
||||
fun foo(b: B) {
|
||||
b.<!INVISIBLE_REFERENCE!>prv<!>()
|
||||
}
|
||||
|
||||
private fun prv() {}
|
||||
}
|
||||
|
||||
abstract class B : A()
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// SKIP_TXT
|
||||
|
||||
abstract class A {
|
||||
fun foo(b: B) {
|
||||
b.<!INVISIBLE_MEMBER!>prv<!>()
|
||||
}
|
||||
|
||||
private fun prv() {}
|
||||
}
|
||||
|
||||
abstract class B : A()
|
||||
Reference in New Issue
Block a user