Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
class A : () -> Unit {
|
||||
override fun invoke() {}
|
||||
}
|
||||
|
||||
class AA : Function0<Unit> {
|
||||
override fun invoke() {}
|
||||
}
|
||||
|
||||
class B : (Double) -> Unit {
|
||||
override fun invoke(p1: Double) {}
|
||||
}
|
||||
|
||||
class BB : Function1<Double, Unit> {
|
||||
override fun invoke(p1: Double) {}
|
||||
}
|
||||
|
||||
open class C {}
|
||||
|
||||
abstract class A0 : (C) -> Int
|
||||
abstract class A1 : Function1<C, Int>
|
||||
|
||||
abstract class A2 : (C, Int) -> Int
|
||||
abstract class A3 : Function2<C, Int, Int>
|
||||
|
||||
abstract class A4 : (Int, C, String) -> Int
|
||||
abstract class A5 : Function3<Int, C, String, Int>
|
||||
|
||||
open class D<T> {}
|
||||
|
||||
abstract class B0<T> : (D<T>) -> Int
|
||||
abstract class B1<T> : Function1<D<T>, Int>
|
||||
|
||||
abstract class B2<T> : (D<T>, C) -> Int
|
||||
abstract class B3<T> : Function2<D<T>, C, Int>
|
||||
|
||||
abstract class B4<T> : (D<T>, C) -> T
|
||||
abstract class B5<T> : Function2<D<T>, C, T>
|
||||
|
||||
interface E<T> {}
|
||||
|
||||
abstract class C0: C(), (Int) -> Double
|
||||
abstract class C1: C(), Function1<Int, Double>
|
||||
|
||||
abstract class C2<T>: C(), E<T>, (Int, C) -> Double
|
||||
abstract class C3<T>: C(), E<T>, Function2<Int, C, Double>
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
class A : () -> Unit {
|
||||
override fun invoke() {}
|
||||
}
|
||||
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
import java.io.Serializable
|
||||
|
||||
class A<T> where T : Cloneable, T : Serializable
|
||||
|
||||
interface CS1 : Cloneable, Serializable
|
||||
interface CS2 : CS1
|
||||
|
||||
interface I1 {
|
||||
fun foo(): A<in CS2>
|
||||
}
|
||||
|
||||
interface I2 : I1 {
|
||||
override fun foo(): A<CS1>
|
||||
}
|
||||
|
||||
interface I3 : I1 {
|
||||
override fun foo(): A<in CS1>
|
||||
}
|
||||
compiler/testData/diagnostics/tests/subtyping/invariantArgumentForTypeParameterWithMultipleBounds.kt
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
import java.io.Serializable
|
||||
|
||||
class A<T> where T : Cloneable, T : Serializable
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
// JAVAC_EXPECTED_FILE
|
||||
|
||||
import java.util.ArrayList
|
||||
|
||||
class Pair<A, B>(val a: A, val b: B)
|
||||
|
||||
class MyListOfPairs<T> : ArrayList<Pair<T, T>>() { }
|
||||
|
||||
fun test() {
|
||||
checkSubtype<ArrayList<Pair<Int, Int>>>(MyListOfPairs<Int>())
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !CHECK_TYPE
|
||||
// JAVAC_EXPECTED_FILE
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
//KT-2069 Cannot call super method when superclass has type parameters
|
||||
package kt2069
|
||||
|
||||
interface T1 {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
class T : T1 {
|
||||
fun bar() {
|
||||
super<T1>.foo()
|
||||
}
|
||||
|
||||
companion object {}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
//KT-2069 Cannot call super method when superclass has type parameters
|
||||
package kt2069
|
||||
|
||||
|
||||
Reference in New Issue
Block a user