[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:
Dmitriy Novozhilov
2020-12-07 10:08:56 +03:00
parent 1d04fecd29
commit e6b5cb5216
1823 changed files with 3014 additions and 2662 deletions
@@ -8,4 +8,4 @@ fun foo() {
v.<!INAPPLICABLE_CANDIDATE!>length<!>
v = "abc"
v.length
}
}
@@ -5,7 +5,7 @@ fun foo() {
v = "abc"
<!DEBUG_INFO_SMARTCAST!>v<!>.length
v = null
<!OI;DEBUG_INFO_CONSTANT!>v<!><!UNSAFE_CALL!>.<!>length
<!DEBUG_INFO_CONSTANT{OI}!>v<!><!UNSAFE_CALL!>.<!>length
v = "abc"
<!DEBUG_INFO_SMARTCAST!>v<!>.length
}
}
@@ -6,7 +6,7 @@ fun foo() {
val y = x
x = null
if (y != null) {
<!OI;DEBUG_INFO_CONSTANT!>x<!><!UNSAFE_CALL!>.<!>hashCode()
<!DEBUG_INFO_CONSTANT{OI}!>x<!><!UNSAFE_CALL!>.<!>hashCode()
}
}
@@ -23,7 +23,7 @@ fun bar(s: String?) {
val hashCode = ss?.hashCode()
ss = null
if (hashCode != null) {
<!OI;DEBUG_INFO_CONSTANT!>ss<!><!UNSAFE_CALL!>.<!>hashCode()
<!DEBUG_INFO_CONSTANT{OI}!>ss<!><!UNSAFE_CALL!>.<!>hashCode()
}
}
@@ -76,5 +76,5 @@ fun test6() {
finally {
a = null
}
<!OI;DEBUG_INFO_CONSTANT!>a<!><!UNSAFE_CALL!>.<!>hashCode() // a is null here
<!DEBUG_INFO_CONSTANT{OI}!>a<!><!UNSAFE_CALL!>.<!>hashCode() // a is null here
}
@@ -5,4 +5,4 @@ fun foo() {
v.<!INAPPLICABLE_CANDIDATE!>length<!>
v = null
v.<!INAPPLICABLE_CANDIDATE!>length<!>
}
}
@@ -4,5 +4,5 @@ fun foo() {
// It is possible in principle to provide smart cast here
v<!UNSAFE_CALL!>.<!>length
v = null
<!OI;DEBUG_INFO_CONSTANT!>v<!><!UNSAFE_CALL!>.<!>length
}
<!DEBUG_INFO_CONSTANT{OI}!>v<!><!UNSAFE_CALL!>.<!>length
}
@@ -12,10 +12,10 @@ operator fun Long?.inc() = this?.let { it + 1 }
fun bar(arg: Long?): Long {
var i = arg
if (i++ == 5L) {
return i<!UNSAFE_CALL!>--<!> <!NI;DEBUG_INFO_MISSING_UNRESOLVED, OI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>+<!> i
return i<!UNSAFE_CALL!>--<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE{OI}, DEBUG_INFO_MISSING_UNRESOLVED{NI}!>+<!> i
}
if (i++ == 7L) {
return i++ <!UNSAFE_OPERATOR_CALL!>+<!> <!TYPE_MISMATCH!>i<!>
}
return 0L
}
}
@@ -10,4 +10,4 @@ public fun box() : MyClass? {
var j = i++
j.hashCode()
return i
}
}
@@ -1,7 +1,7 @@
// !WITH_NEW_INFERENCE
class MyClass
operator fun MyClass.inc(): MyClass { <!OI;UNREACHABLE_CODE!>return<!> null!! }
operator fun MyClass.inc(): MyClass { <!UNREACHABLE_CODE{OI}!>return<!> null!! }
public fun box() : MyClass? {
var i : MyClass?
@@ -10,4 +10,4 @@ public fun box() : MyClass? {
var j = <!DEBUG_INFO_SMARTCAST!>i<!>++
<!DEBUG_INFO_SMARTCAST!>j<!>.hashCode()
return i
}
}
@@ -10,4 +10,4 @@ public fun box() {
var j = ++i
// j is null so call is unsafe
j.hashCode()
}
}
@@ -1,7 +1,7 @@
// !WITH_NEW_INFERENCE
class MyClass
operator fun MyClass.inc(): MyClass { <!OI;UNREACHABLE_CODE!>return<!> null!! }
operator fun MyClass.inc(): MyClass { <!UNREACHABLE_CODE{OI}!>return<!> null!! }
public fun box() {
var i : MyClass?
@@ -10,4 +10,4 @@ public fun box() {
var j = ++<!DEBUG_INFO_SMARTCAST!>i<!>
// j is null so call is unsafe
j.hashCode()
}
}
@@ -15,7 +15,7 @@ class MyClass {
m = create()
// See KT-7428
for ((k, v) in <!SMARTCAST_IMPOSSIBLE!>m<!>)
res += (<!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>k<!>.<!NI;DEBUG_INFO_MISSING_UNRESOLVED!>length<!> <!NI;DEBUG_INFO_MISSING_UNRESOLVED!>+<!> <!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>v<!>.<!NI;DEBUG_INFO_MISSING_UNRESOLVED!>length<!>)
res += (<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE{NI}!>k<!>.<!DEBUG_INFO_MISSING_UNRESOLVED{NI}!>length<!> <!DEBUG_INFO_MISSING_UNRESOLVED{NI}!>+<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE{NI}!>v<!>.<!DEBUG_INFO_MISSING_UNRESOLVED{NI}!>length<!>)
return res
}
}
}
@@ -13,4 +13,4 @@ fun max(a: IntArray): Int? {
maxI = i
}
return maxI
}
}
@@ -9,8 +9,8 @@ fun IntArray.forEachIndexed( op: (i: Int, value: Int) -> Unit) {
fun max(a: IntArray): Int? {
var maxI: Int? = null
a.forEachIndexed { i, value ->
if (maxI == null || value >= a[<!NI;SMARTCAST_IMPOSSIBLE, SMARTCAST_IMPOSSIBLE!>maxI<!>])
if (maxI == null || value >= a[<!SMARTCAST_IMPOSSIBLE{NI}, SMARTCAST_IMPOSSIBLE!>maxI<!>])
maxI = i
}
return maxI
}
}
@@ -2,5 +2,5 @@
fun foo(): Int {
var i: Int? = <!VARIABLE_WITH_REDUNDANT_INITIALIZER!>42<!>
i = null
return <!TYPE_MISMATCH!><!OI;DEBUG_INFO_CONSTANT!>i<!> + 1<!>
}
return <!TYPE_MISMATCH!><!DEBUG_INFO_CONSTANT{OI}!>i<!> + 1<!>
}
@@ -3,4 +3,4 @@ fun foo(): Int {
var s: String? = "abc"
s = null
return s.<!INAPPLICABLE_CANDIDATE!>length<!>
}
}
@@ -2,5 +2,5 @@
fun foo(): Int {
var s: String? = <!VARIABLE_WITH_REDUNDANT_INITIALIZER!>"abc"<!>
s = null
return <!OI;DEBUG_INFO_CONSTANT!>s<!><!UNSAFE_CALL!>.<!>length
}
return <!DEBUG_INFO_CONSTANT{OI}!>s<!><!UNSAFE_CALL!>.<!>length
}