[FIR] add reversed testData to update it in the next commit

^KT-56543
This commit is contained in:
Dmitrii Gridin
2023-04-05 08:55:16 +02:00
committed by Space Team
parent cc52e896f9
commit 1c5aa6c45b
62 changed files with 695 additions and 36 deletions
@@ -1,4 +1,3 @@
// IGNORE_REVERSED_RESOLVE
fun <T, R> use(x: (T) -> R): (T) -> R = x
fun foo() = use(::bar)
@@ -0,0 +1,16 @@
FILE: implicitTypes.kt
public final fun <T, R> use(x: R|(T) -> R|): R|(T) -> R| {
^use R|<local>/x|
}
public final fun foo(): R|(kotlin/String) -> kotlin/Int| {
^foo R|/use|<R|kotlin/String|, R|kotlin/Int|>(::R|/bar|)
}
public final fun bar(x: R|kotlin/String|): R|kotlin/Int| {
^bar Int(1)
}
public final fun loop1(): R|(ERROR CLASS: Cannot infer argument for type parameter T) -> ERROR CLASS: Cannot infer argument for type parameter R| {
^loop1 R|/use<Inapplicable(INAPPLICABLE): /use>#|<<ERROR TYPE REF: Cannot infer argument for type parameter T>, <ERROR TYPE REF: Cannot infer argument for type parameter R>>(::<Unresolved reference: loop2>#)
}
public final fun loop2(): <ERROR TYPE REF: cycle> {
^loop2 R|/loop1|()
}
@@ -0,0 +1,7 @@
fun <T, R> use(x: (T) -> R): (T) -> R = x
fun foo() = use(::bar)
fun bar(x: String) = 1
fun loop1() = <!INAPPLICABLE_CANDIDATE!>use<!>(::<!UNRESOLVED_REFERENCE!>loop2<!>)
fun loop2() = <!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM!>loop1()<!>