removed AutoCastReceiver

check subtype for receiver by AutoCastUtils.isSubTypeByAutoCast directly
 #KT-4403 Fixed
 #KT-4415 Fixed
This commit is contained in:
Svetlana Isakova
2014-01-18 23:13:31 +04:00
parent 5ef320173c
commit 9ed57a5767
14 changed files with 161 additions and 179 deletions
@@ -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
}