Delay ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound to 2.0

#KT-57395 Fixed
Related to KT-47986
This commit is contained in:
Mikhail Glukhikh
2023-03-17 16:01:00 +01:00
committed by Space Team
parent 5ef62c8760
commit a43a16b25b
23 changed files with 191 additions and 38 deletions
@@ -7,7 +7,7 @@ fun <T> List<T>.myGenericExt() {}
fun <R> a(first: R, second: (List<R>) -> Unit) {}
fun test1() {
a(
<!INFERRED_INTO_DECLARED_UPPER_BOUNDS!>a<!>(
buildList { add("") },
<!BUILDER_INFERENCE_MULTI_LAMBDA_RESTRICTION("R; a")!>second = {
it.myGenericExt()
@@ -67,4 +67,4 @@ fun test4() {
<!BUILDER_INFERENCE_MULTI_LAMBDA_RESTRICTION("D; buildPartList")!>left = { add(1) }<!>,
<!BUILDER_INFERENCE_MULTI_LAMBDA_RESTRICTION("D; buildPartList")!>right = { add("") }<!>
)
}
}