[TD] Update diagnostics test data due to new test runners
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
This commit is contained in:
+10
-10
@@ -6,22 +6,22 @@ fun case_0() {
|
||||
val z: Any? = 10
|
||||
val y = z.run {
|
||||
this as Int
|
||||
<!NI;DEBUG_INFO_SMARTCAST!>this<!> // error in NI: required Int, found Any?; just inferred to Any? in OI
|
||||
<!DEBUG_INFO_SMARTCAST{NI}!>this<!> // error in NI: required Int, found Any?; just inferred to Any? in OI
|
||||
}
|
||||
y checkType { <!NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><Any?>() }
|
||||
y checkType { <!OI;TYPE_MISMATCH!>_<!><Int>() }
|
||||
y checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER{NI}!>_<!><Any?>() }
|
||||
y checkType { <!TYPE_MISMATCH{OI}!>_<!><Int>() }
|
||||
}
|
||||
|
||||
fun case_1(z: Any?) {
|
||||
val y = z.run {
|
||||
when (this) {
|
||||
is String -> return@run <!NI;DEBUG_INFO_SMARTCAST!>this<!> // type mismatch in the new inference (required String, found Any?)
|
||||
is String -> return@run <!DEBUG_INFO_SMARTCAST{NI}!>this<!> // type mismatch in the new inference (required String, found Any?)
|
||||
is Float -> ""
|
||||
else -> return@run ""
|
||||
}
|
||||
}
|
||||
y checkType { <!NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><Any?>() }
|
||||
y checkType { <!OI;TYPE_MISMATCH!>_<!><kotlin.String>() }
|
||||
y checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER{NI}!>_<!><Any?>() }
|
||||
y checkType { <!TYPE_MISMATCH{OI}!>_<!><kotlin.String>() }
|
||||
// y is inferred to Any?
|
||||
}
|
||||
|
||||
@@ -40,12 +40,12 @@ fun case_2(z: Any?) {
|
||||
fun case_3(z: Any?) {
|
||||
val y = z.let {
|
||||
when (it) {
|
||||
is String -> return@let <!NI;DEBUG_INFO_SMARTCAST!>it<!>
|
||||
is String -> return@let <!DEBUG_INFO_SMARTCAST{NI}!>it<!>
|
||||
is Float -> ""
|
||||
else -> return@let ""
|
||||
}
|
||||
}
|
||||
y checkType { <!NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><Any?>() }
|
||||
y checkType { <!OI;TYPE_MISMATCH!>_<!><kotlin.String>() }
|
||||
y checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER{NI}!>_<!><Any?>() }
|
||||
y checkType { <!TYPE_MISMATCH{OI}!>_<!><kotlin.String>() }
|
||||
// y is inferred to String
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user