K1/K2: add a test fixing behavior of overloadResolutionByLambda/PCLA combo
This commit is contained in:
committed by
Space Team
parent
8217aa9633
commit
e532220305
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
@OverloadResolutionByLambdaReturnType
|
||||
fun <E1> buildL(x: MutableList<E1>.() -> Int): Int = 1
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
@OverloadResolutionByLambdaReturnType
|
||||
fun <E2> buildL(x: MutableList<E2>.() -> String): String = ""
|
||||
|
||||
fun main() {
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>buildL<!> {
|
||||
<!UNRESOLVED_REFERENCE!>add<!>("")
|
||||
""
|
||||
}
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
@OverloadResolutionByLambdaReturnType
|
||||
fun <E1> buildL(x: MutableList<E1>.() -> Int): Int = 1
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
@OverloadResolutionByLambdaReturnType
|
||||
fun <E2> buildL(x: MutableList<E2>.() -> String): String = ""
|
||||
|
||||
fun main() {
|
||||
<!NONE_APPLICABLE!>buildL<!> {
|
||||
<!UNRESOLVED_REFERENCE!>add<!>("")
|
||||
""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user