K2: Fix false-positive DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE
For explanation, see nestedPartiallyResolvedCallsSimple.k
The problem was caused by "select" variable is being leaked to the
inference session of delegate while it should not happen because
it doesn't belong to the common system of `KotlinVal { ..` call,
as we complete it with fixing `E` variable during completion
for `A(select(null, fun(): Int { return 1 }))`.
The root of the problem is that we were adding all the partial
nested calls to the session, while in fact we only need there
the top-level one.
^KT-57543 Fixed
This commit is contained in:
Vendored
+1
-1
@@ -30,7 +30,7 @@ internal class TowerDataElementsForName2() {
|
||||
internal class TowerDataElementsForName3() {
|
||||
val reversedFilteredLocalScopes by <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>lazy<!>(LazyThreadSafetyMode.NONE) {
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildList<!> l1@ {
|
||||
buildList l1@ {
|
||||
for (i in lastIndex downTo 0) {
|
||||
val reversedFilteredLocalScopes by lazy(LazyThreadSafetyMode.NONE) {
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ internal class TowerDataElementsForName2() {
|
||||
internal class TowerDataElementsForName3() {
|
||||
val reversedFilteredLocalScopes by <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>lazy<!>(LazyThreadSafetyMode.NONE) {
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildList<!> l1@ {
|
||||
buildList l1@ {
|
||||
for (i in lastIndex downTo 0) {
|
||||
val reversedFilteredLocalScopes by lazy(LazyThreadSafetyMode.NONE) {
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
|
||||
Reference in New Issue
Block a user