13 lines
263 B
Kotlin
Vendored
13 lines
263 B
Kotlin
Vendored
// !LANGUAGE: +SafeCastCheckBoundSmartCasts
|
|
// See KT-19007
|
|
|
|
// Stub
|
|
fun String.indexOf(arg: String) = this.length - arg.length
|
|
|
|
// Stub
|
|
fun String.toLowerCase() = this
|
|
|
|
fun foo(a: Any) {
|
|
// Should compile in 1.2
|
|
(a as? String)?.indexOf(a.toLowerCase())
|
|
} |