FIR: Resolve anonymous function bodies during
IMPLICIT_TYPES_BODY_RESOLVE phase. This fixes an issue where some FirAnnotationCalls can be left with some implicit type refs if they have anonymous functions in the arguments.
This commit is contained in:
committed by
TeamCityServer
parent
e69b729e21
commit
edb6b337dc
+6
-2
@@ -634,7 +634,9 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor
|
||||
}
|
||||
is ResolutionMode.LambdaResolution -> {
|
||||
context.withAnonymousFunction(anonymousFunction, components, data) {
|
||||
transformAnonymousFunctionWithLambdaResolution(anonymousFunction, data).addReturn()
|
||||
withFullBodyResolve {
|
||||
transformAnonymousFunctionWithLambdaResolution(anonymousFunction, data).addReturn()
|
||||
}
|
||||
}
|
||||
}
|
||||
is ResolutionMode.WithExpectedType, is ResolutionMode.ContextIndependent -> {
|
||||
@@ -696,7 +698,9 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor
|
||||
lambda = lambda.transformValueParameters(ImplicitToErrorTypeTransformer, null)
|
||||
val bodyExpectedType = returnTypeRefFromResolvedAtom ?: expectedTypeRef
|
||||
context.withAnonymousFunction(lambda, components, data) {
|
||||
lambda = transformFunction(lambda, withExpectedType(bodyExpectedType)) as FirAnonymousFunction
|
||||
withFullBodyResolve {
|
||||
lambda = transformFunction(lambda, withExpectedType(bodyExpectedType)) as FirAnonymousFunction
|
||||
}
|
||||
}
|
||||
// To separate function and separate commit
|
||||
val writer = FirCallCompletionResultsWriterTransformer(
|
||||
|
||||
Reference in New Issue
Block a user