Respect receiver-dependent visibility when selecting smart-cast type

This commit is contained in:
Denis Zharkov
2016-03-25 13:59:52 +03:00
parent d3b7eb81fa
commit 5bf336474d
16 changed files with 302 additions and 21 deletions
@@ -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<!>
}
}