FE: split test "buildList type argument is inferred into upper bound"
Related to KT-50520, KT-56169
This commit is contained in:
committed by
Space Team
parent
8edf8573b5
commit
ba2d896c01
+2
-1
@@ -1,5 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// SKIP_TXT
|
||||
// !LANGUAGE: -ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound
|
||||
// ISSUE: KT-50520
|
||||
|
||||
fun box(): String {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildList<!> {
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// WITH_STDLIB
|
||||
// !LANGUAGE: -ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound
|
||||
// ISSUE: KT-50520
|
||||
|
||||
fun box(): String {
|
||||
buildList {
|
||||
val foo = { first() }
|
||||
add(0, foo)
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundForbidden.fir.kt
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// WITH_STDLIB
|
||||
// !LANGUAGE: +ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound
|
||||
// ISSUE: KT-56169
|
||||
|
||||
fun box(): String {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildList<!> {
|
||||
val foo = { first() }
|
||||
add(0, foo)
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// SKIP_TXT
|
||||
// !LANGUAGE: +ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound
|
||||
// ISSUE: KT-56169
|
||||
|
||||
fun box(): String {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildList<!> {
|
||||
Reference in New Issue
Block a user