removed AutoCastReceiver
check subtype for receiver by AutoCastUtils.isSubTypeByAutoCast directly #KT-4403 Fixed #KT-4415 Fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
//KT-4403 Wrong "type mismatch" on smart cast with inference
|
||||
|
||||
trait A
|
||||
trait B : A
|
||||
|
||||
fun <T> T.f(): T = this
|
||||
|
||||
fun test(a: A) {
|
||||
if (a !is B) return
|
||||
val <!UNUSED_VARIABLE!>c<!> = <!DEBUG_INFO_AUTOCAST!>a<!>.f() // type mismatch
|
||||
}
|
||||
Reference in New Issue
Block a user