FIR: Minor. Move "storeFunction" call to transformSimpleFunction
It's only neede there and also scope structure will be cleaned up after transformFunctionWithGivenSignature in the following commits
This commit is contained in:
+4
-3
@@ -439,6 +439,10 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor
|
|||||||
return simpleFunction.compose()
|
return simpleFunction.compose()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (context.containerIfAny !is FirClass<*>) {
|
||||||
|
context.storeFunction(simpleFunction)
|
||||||
|
}
|
||||||
|
|
||||||
return withTypeParametersOf(simpleFunction) {
|
return withTypeParametersOf(simpleFunction) {
|
||||||
val containingDeclaration = context.containerIfAny
|
val containingDeclaration = context.containerIfAny
|
||||||
if (containingDeclaration != null && containingDeclaration !is FirClass<*>) {
|
if (containingDeclaration != null && containingDeclaration !is FirClass<*>) {
|
||||||
@@ -464,9 +468,6 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor
|
|||||||
function: F,
|
function: F,
|
||||||
resolutionMode: ResolutionMode,
|
resolutionMode: ResolutionMode,
|
||||||
): CompositeTransformResult<F> {
|
): CompositeTransformResult<F> {
|
||||||
if (function is FirSimpleFunction && context.containerIfAny !is FirClass<*>) {
|
|
||||||
context.storeFunction(function)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
val result = transformFunction(function, resolutionMode).single as F
|
val result = transformFunction(function, resolutionMode).single as F
|
||||||
|
|||||||
Reference in New Issue
Block a user