mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-13 00:21:28 +00:00
15 lines
337 B
Kotlin
Vendored
15 lines
337 B
Kotlin
Vendored
// KT-2225 Object expression delegation parameter should be checked with data flow info
|
|
|
|
interface A {
|
|
fun foo() : Int
|
|
}
|
|
|
|
class B : A {
|
|
override fun foo() = 10
|
|
}
|
|
fun foo(b: B?) : Int {
|
|
if (b == null) return 0
|
|
val o = object : A by <!DEBUG_INFO_SMARTCAST!>b<!> { //no info about b not null check
|
|
}
|
|
return o.foo()
|
|
} |