[FIR] Fix mutant extension function types
Consider the following example from
`extensionLambdasAndArrow.kt`:
```
val x4: String.() -> String = if (true) {
{ str: String -> "this" }
} else {
{ str: String -> "this" }
}
```
Because of
`coerceFirstParameterToExtensionReceiver`
the given lambdas must be of the type
`String.() -> String`, but because of a bug
they are `String.(String) -> String`. At the
same time, during inference their expected
types are, indeed, calculated correctly as
`String.() -> String`.
^KT-59394 Declined
(no more compiler crashes, #potential-feature)
This commit is contained in:
committed by
Space Team
parent
bca44e5d8c
commit
9850987415
+5
@@ -15377,6 +15377,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/fir/emptyIntersectionWarning.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("selectingLambdas.kt")
|
||||
public void ignoreSelectingLambdas() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/fir/selectingLambdas.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeParameterInClashingAccessor.kt")
|
||||
public void ignoreTypeParameterInClashingAccessor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/fir/typeParameterInClashingAccessor.kt");
|
||||
|
||||
Reference in New Issue
Block a user