Files
kotlin-fork/compiler/testData/diagnostics/tests/QualifiedExpressions.fir.kt
T
Denis.Zharkov d7399ed1cf K2: Avoid losing diagnostics for synthetic calls
Some of the changed tests may duplicate other existing diagnostics,
but that should not be reason not to report them at all.

There might be another job to be done to avoid diagnostic duplications
2023-02-15 08:13:41 +00:00

14 lines
429 B
Kotlin
Vendored

package qualified_expressions
fun test(s: IntRange?) {
val a: Int = <!INITIALIZER_TYPE_MISMATCH!>s?.start<!>
val b: Int? = s?.start
val c: Int = s?.start ?: -11
val d: Int = <!TYPE_MISMATCH!>s?.start ?: "empty"<!>
val e: String = <!TYPE_MISMATCH!>s?.start ?: "empty"<!>
val f: Int = s?.endInclusive ?: b ?: 1
val g: Boolean? = e.startsWith("s")//?.length
}
fun String.startsWith(s: String): Boolean = true