Refine 'isMoreSpecific' calculation

Choose member with better visibility, it's needed for proper calculation
of types intersection member scope

 #KT-10481 Fixed
This commit is contained in:
Denis Zharkov
2016-02-02 11:40:25 +03:00
parent 148b53fc62
commit 8df05c6c4c
6 changed files with 100 additions and 0 deletions
@@ -0,0 +1,15 @@
open class A {
open var value: Int = 4
protected set
}
class MutableA : A() {
override var value: Int = 4
public set
}
fun test(myA: A) {
if (myA is MutableA) {
<!DEBUG_INFO_SMARTCAST!>myA<!>.value = 5
}
}