K2: Set special function kind to function param with receiver
`StubBasedFirTypeDeserializer` handles function parameter with a receiver with a special exception, which sets it as `ExtensionFunctionType`, but skips setting special function kinds for it even when the function parameter type is a special function kind. This drops `Composable` annotation from a lambda expression if the function parameter taking the lambda expression as an argument has a receiver, which causes a severe CodeGen error for Compose app on K2 Android Studio. ^KT-66526 Fixed
This commit is contained in:
+5
-1
@@ -231,7 +231,11 @@ internal class StubBasedFirTypeDeserializer(
|
||||
constructor,
|
||||
arguments,
|
||||
isNullable = isNullable,
|
||||
if (typeElement is KtFunctionType && typeElement.receiver != null) ConeAttributes.WithExtensionFunctionType else attributes
|
||||
if (typeElement is KtFunctionType && typeElement.receiver != null) {
|
||||
ConeAttributes.WithExtensionFunctionType.add(attributes)
|
||||
} else {
|
||||
attributes
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user