[FIR] Add comment for keeping the two places where class scopes are build in sync.
This commit is contained in:
committed by
Space Team
parent
d574d859cb
commit
b7bdbd270f
+5
@@ -461,6 +461,11 @@ open class FirTypeResolveTransformer(
|
|||||||
|
|
||||||
fun removeOuterTypeParameterScope(firClass: FirClass): Boolean = !firClass.isInner && !firClass.isLocal
|
fun removeOuterTypeParameterScope(firClass: FirClass): Boolean = !firClass.isInner && !firClass.isLocal
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Changes to the order of scopes should also be reflected in
|
||||||
|
* [org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.BodyResolveContext.withScopesForClass].
|
||||||
|
* Otherwise, we get different behavior between type resolve and body resolve phases.
|
||||||
|
*/
|
||||||
inline fun <R> withClassScopes(
|
inline fun <R> withClassScopes(
|
||||||
firClass: FirClass,
|
firClass: FirClass,
|
||||||
crossinline actionInsideStaticScope: () -> Unit = {},
|
crossinline actionInsideStaticScope: () -> Unit = {},
|
||||||
|
|||||||
+5
@@ -440,6 +440,11 @@ class BodyResolveContext(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Changes to the order of scopes should also be reflected in
|
||||||
|
* [org.jetbrains.kotlin.fir.resolve.transformers.FirTypeResolveTransformer.withClassScopes].
|
||||||
|
* Otherwise, we get different behavior between type resolve and body resolve phases.
|
||||||
|
*/
|
||||||
fun <T> withScopesForClass(
|
fun <T> withScopesForClass(
|
||||||
owner: FirClass,
|
owner: FirClass,
|
||||||
holder: SessionHolder,
|
holder: SessionHolder,
|
||||||
|
|||||||
Reference in New Issue
Block a user