Remove backend tests on old inference

Also remove any mentions of NewInference, and rename some tests.
This commit is contained in:
Alexander Udalov
2021-09-28 23:36:48 +02:00
parent 3626b1df44
commit 1071919706
179 changed files with 609 additions and 1953 deletions
@@ -1,10 +1,10 @@
// !LANGUAGE: -NewInference
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: genericSamProjectedOut.kt
import example.SomeJavaClass
fun test(a: SomeJavaClass<out String>) {
fun test() {
var a: SomeJavaClass<out String> = SomeJavaClass()
// a::someFunction parameter has type of Nothing
// while it's completely safe to pass a lambda for a SAM
// since Hello is effectively contravariant by its parameter
@@ -12,6 +12,8 @@ fun test(a: SomeJavaClass<out String>) {
a.someFunction {}
a + {}
a[{}]
a += {}
a[0] = {}
}
// FILE: example/Hello.java
@@ -30,11 +32,16 @@ public class SomeJavaClass<A> {
((Hello)hello).invoke("OK");
}
public void plus(Hello<A> hello) {
public SomeJavaClass<A> plus(Hello<A> hello) {
((Hello)hello).invoke("OK");
return this;
}
public void get(Hello<A> hello) {
((Hello)hello).invoke("OK");
}
public void set(int i, Hello<A> hello) {
((Hello)hello).invoke("OK");
}
}