Respect receiver-dependent visibility when selecting smart-cast type
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
open class BaseClass() {
|
||||
protected class Nested(val x: Int, protected val y: Int)
|
||||
|
||||
protected fun foo() = Nested(1, 2)
|
||||
}
|
||||
|
||||
class Foo : BaseClass() {
|
||||
fun bar() {
|
||||
val f = foo()
|
||||
f.x
|
||||
f.<!INVISIBLE_MEMBER!>y<!>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user