FE: rework tests around changed progression resolve
Related to KT-54261, KT-36932, KT-49276
This commit is contained in:
committed by
Space Team
parent
5fda57fa55
commit
941446ea39
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// !LANGUAGE: -ProgressionsChangingResolve -DisableCheckingChangedProgressionsResolve
|
||||
// This test is not K1/K2 identical due to KT-58789 not implemented yet
|
||||
|
||||
fun <E> SmartList(x: E) {}
|
||||
fun <E> SmartList(x: Collection<E>) {}
|
||||
@@ -22,10 +24,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(<!PROGRESSIONS_CHANGING_RESOLVE_WARNING!>1..2<!>) // warning
|
||||
SmartList<IntRange>(1..10) // no warning
|
||||
|
||||
append(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..10<!>) // warning
|
||||
append(<!PROGRESSIONS_CHANGING_RESOLVE_WARNING!>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 +37,9 @@ fun main() {
|
||||
|
||||
append3(In(1..10)) // no warning
|
||||
|
||||
append4(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..10<!>) // warning
|
||||
append4(<!PROGRESSIONS_CHANGING_RESOLVE_WARNING!>1..10<!>) // warning
|
||||
|
||||
append4<IntRange>(1..10) // warning
|
||||
|
||||
takes(<!PROGRESSIONS_CHANGING_RESOLVE_ERROR!>1..10<!>) // warning
|
||||
takes(<!PROGRESSIONS_CHANGING_RESOLVE_WARNING!>1..10<!>) // warning
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user