[FIR] Handle FirErrorExpression when resolving arguments
^KT-65787: Fixed
This commit is contained in:
committed by
Space Team
parent
7a150cce47
commit
3dda88ddc2
@@ -124,6 +124,14 @@ fun Candidate.resolveArgumentExpression(
|
||||
isReceiver,
|
||||
isDispatch
|
||||
)
|
||||
is FirErrorExpression -> {
|
||||
val wrappedExpression = argument.expression
|
||||
if (wrappedExpression != null) {
|
||||
resolveArgumentExpression(csBuilder, wrappedExpression, expectedType, sink, context, isReceiver, isDispatch)
|
||||
} else {
|
||||
resolvePlainExpressionArgument(csBuilder, argument, expectedType, sink, context, isReceiver, isDispatch)
|
||||
}
|
||||
}
|
||||
else -> resolvePlainExpressionArgument(csBuilder, argument, expectedType, sink, context, isReceiver, isDispatch)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,3 +35,11 @@ fun foo6() {
|
||||
fun foo7() {
|
||||
<!MULTIPLE_LABELS_ARE_FORBIDDEN!>l3@<!> <!MULTIPLE_LABELS_ARE_FORBIDDEN!>l2@<!> l1@ fun bar() {}
|
||||
}
|
||||
|
||||
fun func(y: (Unit) -> Unit) {}
|
||||
|
||||
fun foo8() {
|
||||
func(l@ {})
|
||||
func(<!MULTIPLE_LABELS_ARE_FORBIDDEN!>l2@<!> l1@ {})
|
||||
func(<!UNDERSCORE_IS_RESERVED!>_<!>@ {})
|
||||
}
|
||||
|
||||
@@ -35,3 +35,11 @@ fun foo6() {
|
||||
fun foo7() {
|
||||
l3@ l2@ l1@ fun bar() {}
|
||||
}
|
||||
|
||||
fun func(y: (Unit) -> Unit) {}
|
||||
|
||||
fun foo8() {
|
||||
func(l@ {})
|
||||
func(l2@ l1@ {})
|
||||
func(<!UNDERSCORE_IS_RESERVED!>_<!>@ {})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user