[FIR] Fix missing receiver type if anonymous function without label

This commit is contained in:
simon.ogorodnik
2020-04-07 23:43:42 +03:00
parent d2fd377605
commit f573719cc1
143 changed files with 249 additions and 766 deletions
@@ -403,8 +403,8 @@ class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransformer)
}
val label = anonymousFunction.label
return if (label != null && receiverTypeRef is FirResolvedTypeRef) {
withLabelAndReceiverType(Name.identifier(label.name), anonymousFunction, receiverTypeRef.type) {
return if (label != null || receiverTypeRef is FirResolvedTypeRef) {
withLabelAndReceiverType(label?.name?.let { Name.identifier(it) }, anonymousFunction, receiverTypeRef?.coneTypeSafe()) {
transform()
}
} else {