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:
+16
@@ -0,0 +1,16 @@
|
||||
abstract class A {
|
||||
abstract protected fun foo(): String
|
||||
abstract protected val bar: String
|
||||
}
|
||||
|
||||
interface B {
|
||||
fun foo(): String
|
||||
val bar: String
|
||||
}
|
||||
|
||||
fun test(x: A) {
|
||||
if (x is B) {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.foo()
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.bar
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user