e6b5cb5216
Update includes:
- Changing syntax of `OI/`NI` tags from `<!NI;TAG!>` to `<!TAG{NI}!>`
- Fix some incorrect directives
- Change order of diagnostics in some places
- Remove ignored diagnostics from FIR test data (previously `DIAGNOSTICS` didn't work)
- Update FIR dumps in some places and add `FIR_IDENTICAL` if needed
- Replace all JAVAC_SKIP with SKIP_JAVAC directive
15 lines
629 B
Kotlin
Vendored
15 lines
629 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
package qualified_expressions
|
|
|
|
fun test(s: IntRange?) {
|
|
val <!UNUSED_VARIABLE!>a<!>: Int = <!TYPE_MISMATCH!>s?.start<!>
|
|
val b: Int? = s?.start
|
|
val <!UNUSED_VARIABLE!>c<!>: Int = s?.start ?: -11
|
|
val <!UNUSED_VARIABLE!>d<!>: Int = <!TYPE_MISMATCH{NI}!>s?.start ?: <!TYPE_MISMATCH{OI}!>"empty"<!><!>
|
|
val e: String = <!TYPE_MISMATCH{NI}!><!TYPE_MISMATCH{OI}!>s?.start<!> ?: "empty"<!>
|
|
val <!UNUSED_VARIABLE!>f<!>: Int = s?.endInclusive ?: b ?: 1
|
|
val <!UNUSED_VARIABLE!>g<!>: Boolean? = e.startsWith("s")//?.length
|
|
}
|
|
|
|
fun String.startsWith(<!UNUSED_PARAMETER!>s<!>: String): Boolean = true
|