Update tests after switching to LV 1.9

This commit is contained in:
Dmitriy Novozhilov
2023-01-23 11:34:48 +02:00
committed by Space Team
parent 66544a4e00
commit 88efa6bfb6
279 changed files with 1520 additions and 1239 deletions
@@ -1,43 +0,0 @@
// WITH_STDLIB
fun <E> SmartList(x: E) {}
fun <E> SmartList(x: Collection<E>) {}
fun append(x: Any?) {}
fun append(x: Collection<*>) {}
fun append2(x: Iterable<*>) {}
fun append2(x: Collection<*>) {}
class In<in T>(x: T)
@JvmName("append31")
fun append3(x: In<Nothing>) {}
fun append3(x: In<Collection<*>>) {}
fun <E> append4(x: E) {}
fun <E: Collection<*>> append4(x: E) {}
fun <T> takes(range: T) {}
fun <T> takes(range: T) where T : Collection<*>, T: ClosedRange<*> {}
fun main() {
SmartList(1..2) // warning
SmartList<IntRange>(1..10) // no warning
append(1..10) // warning
append((1..10) as Any) // no warning
append((1..10) as Iterable<Int>) // no warning
append("a".."z") // no warning, the range is not iterable
append(1.0..2.0)
append2(1..10) // no warning
append3(In(1..10)) // no warning
append4(1..10) // warning
append4<IntRange>(1..10) // warning
takes(1..10) // warning
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// WITH_STDLIB
fun <E> SmartList(x: E) {}
@@ -22,10 +23,10 @@ fun <T> takes(range: T) {}
fun <T> takes(range: T) where T : Collection<*>, T: ClosedRange<*> {}
fun main() {
SmartList(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..2<!>) // warning
SmartList(1..2) // warning
SmartList<IntRange>(1..10) // no warning
append(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..10<!>) // warning
append(1..10) // warning
append((1..10) as Any) // no warning
append((1..10) as Iterable<Int>) // no warning
append("a".."z") // no warning, the range is not iterable
@@ -35,9 +36,9 @@ fun main() {
append3(In(1..10)) // no warning
append4(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..10<!>) // warning
append4(1..10) // warning
append4<IntRange>(1..10) // warning
takes(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..10<!>) // warning
takes(1..10) // warning
}
@@ -1,37 +0,0 @@
// WITH_STDLIB
// !LANGUAGE: +ProgressionsChangingResolve
fun <E> SmartList(x: E) {}
fun <E> SmartList(x: Collection<E>) {}
fun append(x: Any?) {}
fun append(x: Collection<*>) {}
fun append2(x: Iterable<*>) {}
fun append2(x: Collection<*>) {}
class In<in T>(x: T)
@JvmName("append31")
fun append3(x: In<Nothing>) {}
fun append3(x: In<Collection<*>>) {}
fun <E> append4(x: E) {}
fun <E: Collection<*>> append4(x: E) {}
fun main() {
SmartList(1..2) // warning
SmartList<IntRange>(1..10) // no warning
append(1..10) // warning
append((1..10) as Any) // no warning
append((1..10) as Iterable<Int>) // no warning
append("a".."z") // no warning, the range is not iterable
append(1.0..2.0)
append2(1..10) // no warning
append3(In(1..10)) // no warning
append4(1..10) // warning
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// WITH_STDLIB
// !LANGUAGE: +ProgressionsChangingResolve
@@ -20,10 +21,10 @@ fun <E> append4(x: E) {}
fun <E: Collection<*>> append4(x: E) {}
fun main() {
SmartList(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR("fun <E> SmartList(x: Collection<E>): Unit")!>1..2<!>) // warning
SmartList(1..2) // warning
SmartList<IntRange>(1..10) // no warning
append(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR("fun append(x: Collection<*>): Unit")!>1..10<!>) // warning
append(1..10) // warning
append((1..10) as Any) // no warning
append((1..10) as Iterable<Int>) // no warning
append("a".."z") // no warning, the range is not iterable
@@ -33,5 +34,5 @@ fun main() {
append3(In(1..10)) // no warning
append4(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR("fun <E : Collection<*>> append4(x: E): Unit")!>1..10<!>) // warning
append4(1..10) // warning
}
@@ -1,53 +0,0 @@
// WITH_STDLIB
// FULL_JDK
// FILE: JavaSmartList.java
import kotlin.ranges.ClosedRange;
import java.util.Collection;
public class JavaSmartList <E> {
JavaSmartList(E x) {}
JavaSmartList(Collection<E> x) {}
static void append(Object x) {}
static void append(Collection<?> x) {}
static void append2(Iterable<?> x) {}
static void append2(Collection<?> x) {}
public static class In <T> {
In(T x) {}
}
static void append3(In<?> x) {}
static void append3(In<Collection<?>> x) {}
static <E> void append4(E x) {}
static <E extends Collection<?>> void append4(E x) {}
static <T> void takes(T x) {}
static <T extends Collection<?> & ClosedRange<?>> void takes(T x) {}
}
// FILE: main.kt
fun main() {
JavaSmartList(1..2) // warning
JavaSmartList<IntRange>(1..10) // no warning
JavaSmartList.append(1..10) // warning
JavaSmartList.append((1..10) as Any) // no warning
JavaSmartList.append((1..10) as Iterable<Int>) // no warning
JavaSmartList.append("a".."z") // no warning, the range is not iterable
JavaSmartList.append(1.0..2.0)
JavaSmartList.append2(1..10) // no warning
JavaSmartList.append3(JavaSmartList.In(1..10)) // no warning
JavaSmartList.append4(1..10) // warning
JavaSmartList.append4<IntRange>(1..10) // warning
JavaSmartList.takes(1..10) // warning
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// WITH_STDLIB
// FULL_JDK
@@ -32,10 +33,10 @@ public class JavaSmartList <E> {
// FILE: main.kt
fun main() {
JavaSmartList(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..2<!>) // warning
JavaSmartList(1..2) // warning
JavaSmartList<IntRange>(1..10) // no warning
JavaSmartList.append(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..10<!>) // warning
JavaSmartList.append(1..10) // warning
JavaSmartList.append((1..10) as Any) // no warning
JavaSmartList.append((1..10) as Iterable<Int>) // no warning
JavaSmartList.append("a".."z") // no warning, the range is not iterable
@@ -45,9 +46,9 @@ fun main() {
JavaSmartList.append3(JavaSmartList.In(1..10)) // no warning
JavaSmartList.append4(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..10<!>) // warning
JavaSmartList.append4(1..10) // warning
JavaSmartList.append4<IntRange>(1..10) // warning
JavaSmartList.takes(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..10<!>) // warning
JavaSmartList.takes(1..10) // warning
}