[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
@@ -1,17 +0,0 @@
Failures detected in FirImplicitTypeBodyResolveTransformerAdapter, file: /My.kt
Cause: java.lang.RuntimeException: While resolving call Q|Properties|.R?C|/Properties.calcVal|(<L> = calcVal@fun <implicit>.<anonymous>(): <implicit> {
lval y: <implicit> = x#.plus#(IntegerLiteral(1))
when () {
CMP(>, y#.compareTo#(IntegerLiteral(0))) -> {
MyBase#.derivedWrapper#()
}
CMP(<, x#.compareTo#(IntegerLiteral(0))) -> {
MyBase#.exoticWrapper#(x#)
}
else -> {
throw java#.lang#.NullPointerException#(String())
}
}
}
)
@@ -1,76 +0,0 @@
// !WITH_NEW_INFERENCE
// NI_EXPECTED_FILE
// JAVAC_EXPECTED_FILE
// FILE: Base.java
public interface Base {}
// FILE: Other.java
public interface Other {}
// FILE: Derived.java
public final class Derived<T> implements Base, Other {}
// FILE: Exotic.java
public final class Exotic implements Base, Other {
int x;
Exotic(int x) {
this.x = x;
}
}
// FILE: Properties.java
import kotlin.jvm.functions.Function0;
class Val<T> {
Function0<T> initializer;
Val(Function0<T> initializer) {
this.initializer = initializer;
}
T getValue(Object instance, Object metadata) {
return initializer.invoke();
}
}
class Properties {
static <T> Val<T> calcVal(Function0<T> initializer) {
return new Val<T>(initializer);
}
}
// FILE: My.kt
open class Wrapper<out T: Base>(val v: T)
class DerivedWrapper(v: Derived<*>): Wrapper<Derived<*>>(v)
class ExoticWrapper(v: Exotic): Wrapper<Exotic>(v)
object MyBase {
fun derived() = Derived<String>()
fun exotic(x: Int) = Exotic(x)
fun derivedWrapper() = DerivedWrapper(derived())
fun exoticWrapper(x: Int) = ExoticWrapper(exotic(x))
}
class My(val x: Int) {
val wrapper/*: Wrapper<*>*/ by Properties.calcVal {
val y = x + 1
when {
y > 0 -> MyBase.derivedWrapper()
x < 0 -> MyBase.exoticWrapper(x)
else -> throw java.lang.NullPointerException("")
}
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !WITH_NEW_INFERENCE
// NI_EXPECTED_FILE
// JAVAC_EXPECTED_FILE
@@ -28,7 +29,17 @@ public final class Exotic implements Base, Other {
import kotlin.jvm.functions.Function0;
class Val<T> {
public class Properties {
static <T> Val<T> calcVal(Function0<T> initializer) {
return new Val<T>(initializer);
}
}
// FILE: Val.java
import kotlin.jvm.functions.Function0;
public class Val<T> {
Function0<T> initializer;
@@ -41,12 +52,6 @@ class Val<T> {
}
}
class Properties {
static <T> Val<T> calcVal(Function0<T> initializer) {
return new Val<T>(initializer);
}
}
// FILE: My.kt
open class Wrapper<out T: Base>(val v: T)
@@ -63,8 +63,8 @@ public interface Other {
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public/*package*/ open class Properties {
public/*package*/ constructor Properties()
public open class Properties {
public constructor Properties()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
@@ -73,6 +73,15 @@ public/*package*/ open class Properties {
public/*package*/ open fun </*0*/ T : kotlin.Any!> calcVal(/*0*/ initializer: (() -> T!)!): Val<T!>!
}
public open class Val</*0*/ T : kotlin.Any!> {
public/*package*/ constructor Val</*0*/ T : kotlin.Any!>(/*0*/ initializer: (() -> T!)!)
public/*package*/ final var initializer: (() -> T!)!
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public/*package*/ open operator fun getValue(/*0*/ instance: kotlin.Any!, /*1*/ metadata: kotlin.Any!): T!
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public open class Wrapper</*0*/ out T : Base> {
public constructor Wrapper</*0*/ out T : Base>(/*0*/ v: T)
public final val v: T
@@ -80,3 +89,4 @@ public open class Wrapper</*0*/ out T : Base> {
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}