Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed
This commit is contained in:
Vendored
-27
@@ -1,27 +0,0 @@
|
||||
// FILE: J.java
|
||||
public interface J {
|
||||
String foo(); // String!
|
||||
}
|
||||
|
||||
// FILE: K.kt
|
||||
interface K1 {
|
||||
fun foo(): String
|
||||
}
|
||||
|
||||
interface K2 {
|
||||
fun foo(): String?
|
||||
}
|
||||
|
||||
interface KDerived1a : K1, J
|
||||
|
||||
interface KDerived1b : J, K1
|
||||
|
||||
interface KDerived2a : K2, J
|
||||
|
||||
interface KDerived2b : J, K2
|
||||
|
||||
interface KDerived12a : K1, K2, J
|
||||
|
||||
interface KDerived12b : K1, J, K2
|
||||
|
||||
interface KDerived12c : J, K1, K2
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: J.java
|
||||
public interface J {
|
||||
String foo(); // String!
|
||||
|
||||
Vendored
-61
@@ -1,61 +0,0 @@
|
||||
// FILE: InOut.kt
|
||||
interface In<in T>
|
||||
|
||||
// FILE: J1.java
|
||||
public interface J1 {
|
||||
In<String> foo();
|
||||
}
|
||||
|
||||
// FILE: J2.java
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
public interface J2 {
|
||||
@NotNull In<String> foo();
|
||||
}
|
||||
|
||||
// FILE: J3.java
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
public interface J3 {
|
||||
@Nullable In<String> foo();
|
||||
}
|
||||
|
||||
// FILE: K.kt
|
||||
interface K1 {
|
||||
fun foo(): In<String>
|
||||
}
|
||||
|
||||
interface K2 {
|
||||
fun foo(): In<String?>
|
||||
}
|
||||
|
||||
// FIXME TestJ1K1 should have foo(): In<String!>, since In<String!> <: In<String>.
|
||||
interface TestJ1K1 : J1, K1
|
||||
interface TestK1J1 : K1, J1
|
||||
|
||||
interface TestJ1K2 : J1, K2
|
||||
interface TestK2J1 : K2, J1
|
||||
|
||||
interface TestJ2K1 : J2, K1
|
||||
interface TestK1J2 : K1, J2
|
||||
|
||||
interface TestJ2K2 : J2, K2
|
||||
interface TestK2J2 : K2, J2
|
||||
|
||||
interface TestJ3K1 : J3, K1
|
||||
interface TestK1J3 : K1, J3
|
||||
|
||||
interface TestJ3K2 : J3, K2
|
||||
interface TestK2J3 : K2, J3
|
||||
|
||||
interface TestJ1K1K2 : J1, K1, K2
|
||||
interface TestK1J1K2 : K1, J1, K2
|
||||
interface TestK1K2J1 : K1, K2, J1
|
||||
|
||||
interface TestJ2K1K2 : J2, K1, K2
|
||||
interface TestK1J2K2 : K1, J2, K2
|
||||
interface TestK1K2J2 : K1, K2, J2
|
||||
|
||||
interface TestJ3K1K2 : J3, K1, K2
|
||||
interface TestK1J3K2 : K1, J3, K2
|
||||
interface TestK1K2J3 : K1, K2, J3
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: InOut.kt
|
||||
interface In<in T>
|
||||
|
||||
|
||||
Vendored
-56
@@ -1,56 +0,0 @@
|
||||
// FILE: JFooWithUpperBound.java
|
||||
public interface JFooWithUpperBound<T extends IBase> {
|
||||
T foo();
|
||||
}
|
||||
|
||||
// FILE: JFooWithUpperBoundDerived.java
|
||||
public interface JFooWithUpperBoundDerived<T extends IBase> extends JFooWithUpperBound<T> {
|
||||
}
|
||||
|
||||
// FILE: JCFooWithUpperBound.java
|
||||
public class JCFooWithUpperBound<T extends IBase> {
|
||||
public T foo() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: JCFooWithUpperBoundDerived.java
|
||||
public class JCFooWithUpperBoundDerived<T extends IBase> extends JCFooWithUpperBound<T> {
|
||||
}
|
||||
|
||||
// FILE: K.kt
|
||||
interface IBase
|
||||
|
||||
interface IDerived : IBase
|
||||
|
||||
interface IFooWithUpperBound<T : IBase> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
interface IFooT<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
interface IFoo {
|
||||
fun foo(): IBase
|
||||
}
|
||||
|
||||
interface IFooDerived : IFoo {
|
||||
override fun foo(): IDerived
|
||||
}
|
||||
|
||||
interface IFooWithUpperBoundDerived<T : IBase> : IFooWithUpperBound<T>
|
||||
|
||||
interface Test1<T : IBase> : IFooWithUpperBound<T>, IFoo
|
||||
|
||||
interface Test2<T : IBase> : IFooT<T>, IFoo
|
||||
|
||||
interface Test3<T : IDerived> : IFooWithUpperBoundDerived<T>, IFooDerived
|
||||
|
||||
interface Test4<T : IBase> : JFooWithUpperBound<T>, IFoo
|
||||
|
||||
interface Test5<T : IDerived> : JFooWithUpperBoundDerived<T>, IFooDerived
|
||||
|
||||
class Test6<T : IBase> : JCFooWithUpperBound<T>(), IFoo
|
||||
|
||||
class Test7<T : IDerived> : JCFooWithUpperBoundDerived<T>(), IFooDerived
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: JFooWithUpperBound.java
|
||||
public interface JFooWithUpperBound<T extends IBase> {
|
||||
T foo();
|
||||
|
||||
Reference in New Issue
Block a user