K2: reproduce KT-57873
This commit is contained in:
committed by
Space Team
parent
66797ff876
commit
7bd5491498
compiler/testData/diagnostics/testsWithStdLib/builderInference/inferenceFromLambdaReturnType.fir.txt
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
FILE: inferenceFromLambdaReturnType.kt
|
||||
public final class ThemeKey<T> : R|kotlin/Any| {
|
||||
public constructor<T>(): R|ThemeKey<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final fun <S> getWithFallback(fallback: R|(ThemeKey<S>) -> S|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
R|/getWithFallback|<R|kotlin/String|>(<L> = getWithFallback@fun <anonymous>(it: R|ThemeKey<ERROR CLASS: Type for S is not inferred>|): R|kotlin/String| <inline=NoInline> {
|
||||
^ String()
|
||||
}
|
||||
)
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// FIR_IDENTICAL
|
||||
// FIR_DUMP
|
||||
// ISSUE: KT-57873
|
||||
|
||||
class ThemeKey<T>
|
||||
|
||||
fun <S> getWithFallback(fallback: (ThemeKey<S>) -> S) {}
|
||||
|
||||
fun main() {
|
||||
getWithFallback { "" }
|
||||
}
|
||||
Reference in New Issue
Block a user