[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:
Vendored
+1
-1
@@ -50,4 +50,4 @@ fun test(i: Inv<Nothing>, iUnit: Inv<Unit>) {
|
||||
run(A.flexible(iUnit)) { <!UNUSED_EXPRESSION!>42<!> }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithExpectedTypeAndBound.fir.kt
Vendored
+1
-1
@@ -10,4 +10,4 @@ fun b(): Unit = run {
|
||||
run {
|
||||
materializeNumber()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -3,11 +3,11 @@
|
||||
fun <T : Number> materializeNumber(): T = TODO()
|
||||
|
||||
fun a(): Unit = run {
|
||||
<!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materializeNumber<!>()
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER{NI}, TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER{OI}!>materializeNumber<!>()
|
||||
}
|
||||
|
||||
fun b(): Unit = run {
|
||||
run {
|
||||
<!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materializeNumber<!>()
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER{NI}, TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER{OI}!>materializeNumber<!>()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -16,4 +16,4 @@ fun implicitCoercion() {
|
||||
// Error: block doesn't have an expected type, so call can't be inferred!
|
||||
return@l materialize()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -14,6 +14,6 @@ fun implicitCoercion() {
|
||||
|
||||
val <!UNUSED_VARIABLE!>c<!> = l@{
|
||||
// Error: block doesn't have an expected type, so call can't be inferred!
|
||||
return@l <!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materialize<!>()
|
||||
return@l <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER{NI}, TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER{OI}!>materialize<!>()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ fun testParameter() {
|
||||
takeFnToParameter { Unit }
|
||||
takeFnToParameter { <!UNRESOLVED_REFERENCE!>unresolved<!>() }
|
||||
takeFnToParameter { if (true) <!UNRESOLVED_REFERENCE!>unresolved<!>() }
|
||||
<!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>takeFnToParameter<!> {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER{NI}, TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER{OI}!>takeFnToParameter<!> {
|
||||
if (true) <!UNRESOLVED_REFERENCE!>unresolved<!>() else <!UNRESOLVED_REFERENCE!>unresolved<!>()
|
||||
}
|
||||
takeFnToParameter(fun() = Unit)
|
||||
|
||||
compiler/testData/diagnostics/tests/inference/coercionToUnit/indirectCoercionWithExpectedType.fir.kt
Vendored
+1
-1
@@ -33,4 +33,4 @@ fun e(): Unit = run outer@{
|
||||
run inner@{
|
||||
return@outer materialize()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+4
-4
@@ -5,7 +5,7 @@ fun <T> materialize(): T = TODO()
|
||||
fun a(): Unit = run {
|
||||
run {
|
||||
// Ok, block is coerced, because it has (indirectly) Unit-expected type
|
||||
<!NI;UNUSED_EXPRESSION!>"hello"<!>
|
||||
<!UNUSED_EXPRESSION{NI}!>"hello"<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@ fun c(): Unit = run {
|
||||
// Attention!
|
||||
// In OI expected type 'Unit' isn't applied here because of implementation quirks (note that OI still applies Unit in case 'e')
|
||||
// In NI, it is applied and call is correctly inferred, which is consistent with the previous case
|
||||
<!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materialize<!>()
|
||||
<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER{OI}!>materialize<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun d(): Unit = run outer@{
|
||||
run inner@{
|
||||
return@inner <!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materialize<!>()
|
||||
return@inner <!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER{OI}!>materialize<!>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,4 +33,4 @@ fun e(): Unit = run outer@{
|
||||
run inner@{
|
||||
return@outer materialize()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -61,4 +61,4 @@ fun test_6(b: Boolean) {
|
||||
}
|
||||
if (b) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ fun bar(block: () -> String) {}
|
||||
|
||||
fun test_5(b: Boolean) {
|
||||
bar {
|
||||
<!NI;TYPE_MISMATCH, TYPE_MISMATCH!>if (b) {
|
||||
<!TYPE_MISMATCH{NI}, TYPE_MISMATCH!>if (b) {
|
||||
println("meh")
|
||||
}<!>
|
||||
}
|
||||
@@ -61,4 +61,4 @@ fun test_6(b: Boolean) {
|
||||
}
|
||||
if (b) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user