Check postponed type variables to determine suitability for builder inference (during shouldRunCompletion check) more careful

^KT-42139 Fixed
This commit is contained in:
Victor Petukhov
2021-08-03 13:00:46 +03:00
committed by teamcityserver
parent cf3bd016be
commit b6cb393796
2 changed files with 13 additions and 8 deletions
@@ -11,12 +11,12 @@ fun f1(): Sequence<List<Int>> = sequence {
}
fun f2(): Sequence<List<Int>> = sequence {
select(<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>yield<!>(<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>myEmptyList<!>()), yield(<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>myEmptyList<!>()))
select(yield(myEmptyList()), yield(myEmptyList()))
}
fun f3(): Sequence<List<Int>> = sequence {
if (true) <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>yield<!>(<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>myEmptyList<!>()) // [NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER] Not enough information to infer type variable T
else yield(<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>myEmptyList<!>()) // [NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER] Not enough information to infer type variable T
if (true) yield(myEmptyList()) // [NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER] Not enough information to infer type variable T
else yield(myEmptyList()) // [NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER] Not enough information to infer type variable T
}
fun box(): String {