Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed
This commit is contained in:
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
// FILE: First.java
|
||||
|
||||
public class First<T extends Sample> {
|
||||
public static <D extends Sample> void bind(First<D> first) {}
|
||||
}
|
||||
|
||||
// FILE: SubFirst.java
|
||||
|
||||
public class SubFirst<D extends Sample> extends First<D> {}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
interface Sample
|
||||
|
||||
fun test(s: SubFirst<*>) {
|
||||
First.bind(s)
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: First.java
|
||||
|
||||
public class First<T extends Sample> {
|
||||
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
// FILE: JClass.java
|
||||
|
||||
public class JClass {
|
||||
public <K> void foo(Key<K> key, K value) {}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
class Key<T>
|
||||
|
||||
fun <S> select(x: S, y: S): S = x
|
||||
|
||||
fun <T> setValue(key: Key<T>, value: T, j: JClass) {
|
||||
j.foo(key, select(value, null))
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
// FILE: JClass.java
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
abstract class Expr<T>
|
||||
|
||||
class Sum<K>(val e: Expr<K>) : Expr<K?>()
|
||||
|
||||
private fun <V> times(e: Expr<V>, element: V): Expr<V> = TODO()
|
||||
|
||||
private fun <S> foo(e: Expr<S>) {}
|
||||
|
||||
fun test(intExpression: Expr<Int>) {
|
||||
foo(Sum(times(intExpression, 42)))
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
|
||||
Reference in New Issue
Block a user