KT-10483 Missing smart cast on variable in variable as function call
#KT-10483 Fixed
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
interface A
|
||||
class B : A {
|
||||
operator fun invoke() = this
|
||||
}
|
||||
|
||||
class C : A
|
||||
|
||||
operator fun C.invoke(): B = B()
|
||||
|
||||
fun foo(arg: A): B? {
|
||||
if (arg is B) return <!DEBUG_INFO_SMARTCAST!>arg<!>()
|
||||
|
||||
if (arg is C) return <!DEBUG_INFO_SMARTCAST!>arg<!>()
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user