[LL FIR] introduce test with reversed resolve order

^KT-56543

Merge-request: KT-MR-9299
Merged-by: Dmitrii Gridin <dmitry.gridin@jetbrains.com>
This commit is contained in:
Dmitrii Gridin
2023-03-22 17:34:07 +00:00
committed by Space Team
parent 8528519d96
commit 9a4a3d1f49
413 changed files with 55387 additions and 45 deletions
@@ -1,3 +1,4 @@
// IGNORE_REVERSED_RESOLVE
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION -CAST_NEVER_SUCCEEDS -UNUSED_VARIABLE -UNCHECKED_CAST
class Foo<T>(x: T)
@@ -1,3 +1,4 @@
// IGNORE_REVERSED_RESOLVE
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION -CAST_NEVER_SUCCEEDS -UNUSED_VARIABLE -UNCHECKED_CAST
class Foo<T>(x: T)
@@ -1,7 +1,7 @@
/kt48935.kt:7:35: warning: parameter 'func' is never used
/kt48935.kt:8:35: warning: parameter 'func' is never used
fun <T, V> exampleGenericFunction(func: V) where T: Base, V: (T) -> Unit {
^
/kt48935.kt:13:5: warning: type argument for a type parameter T has possible incompatible upper bounds: Base, DoesNotImplementBase (final class and interface)
/kt48935.kt:14:5: warning: type argument for a type parameter T has possible incompatible upper bounds: Base, DoesNotImplementBase (final class and interface)
exampleGenericFunction(func) // expected this to be a compilation error as the T: Base constraint should not be satisfied
^
@@ -1,3 +1,4 @@
// IGNORE_REVERSED_RESOLVE
// FIR_IDENTICAL
// RENDER_DIAGNOSTICS_FULL_TEXT
interface Base
@@ -1,3 +1,4 @@
// IGNORE_REVERSED_RESOLVE
// FIR_IDENTICAL
interface Base
@@ -1,3 +1,4 @@
// IGNORE_REVERSED_RESOLVE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Scope
@@ -1,3 +1,4 @@
// IGNORE_REVERSED_RESOLVE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Scope
@@ -1,3 +1,4 @@
// IGNORE_REVERSED_RESOLVE
open class Test<T1, T2>(val map1 : Map<T1, T2>, val map2 : Map<T2, T1>) {
open val inverse: Test<T2, T1> = object : Test<T2, T1>(<!ARGUMENT_TYPE_MISMATCH!>map2<!>, <!ARGUMENT_TYPE_MISMATCH!>map1<!>) {
@@ -1,3 +1,4 @@
// IGNORE_REVERSED_RESOLVE
open class Test<T1, T2>(val map1 : Map<T1, T2>, val map2 : Map<T2, T1>) {
open val inverse: Test<T2, T1> = object : Test<T2, T1>(map2, map1) {
@@ -1,3 +1,4 @@
// IGNORE_REVERSED_RESOLVE
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
@@ -1,3 +1,4 @@
// IGNORE_REVERSED_RESOLVE
// FIR_IDENTICAL
class B<O>(val obj: O) {