[FIR/NI] Refactor type variable gathering from lambda types
Motivation: - drop getArguments from type context as a duplicate of getArgumentList - reduce the number of collection allocations in getAllDeeplyRelatedTypeVariables Additional minor improvements, test data fixes
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
// !LANGUAGE: -ExperimentalBuilderInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
interface Base
|
||||
|
||||
interface Controller<T> : Base {
|
||||
suspend fun yield(t: T) {}
|
||||
}
|
||||
|
||||
fun <S> generate(g: suspend Controller<S>.() -> Unit): S = TODO()
|
||||
|
||||
suspend fun Base.baseExtension() {}
|
||||
|
||||
val test1 = generate {
|
||||
<!INAPPLICABLE_CANDIDATE!>yield<!>("foo")
|
||||
baseExtension()
|
||||
}
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: -ExperimentalBuilderInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
@@ -13,6 +12,6 @@ fun <S> generate(g: suspend Controller<S>.() -> Unit): S = TODO()
|
||||
suspend fun Base.baseExtension() {}
|
||||
|
||||
val test1 = generate {
|
||||
<!INAPPLICABLE_CANDIDATE!>yield<!>("foo")
|
||||
yield("foo")
|
||||
baseExtension()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user