[SLC] avoid constructor parameters capturing
^KT-56046
This commit is contained in:
committed by
Space Team
parent
80a80d1188
commit
57b6db4f0f
+1
-1
@@ -69,7 +69,7 @@ class SymbolLightClassForFacade(
|
||||
} else {
|
||||
LazyAnnotationsBox(
|
||||
annotationsProvider = SymbolAnnotationsProvider(
|
||||
ktModule = ktModule,
|
||||
ktModule = this.ktModule,
|
||||
annotatedSymbolPointer = firstFileInFacade.symbolPointerOfType<KtFileSymbol>(),
|
||||
annotationUseSiteTarget = AnnotationUseSiteTarget.FILE,
|
||||
acceptAnnotationsWithoutSite = true,
|
||||
|
||||
+3
-3
@@ -93,10 +93,10 @@ internal class SymbolLightAccessorMethod private constructor(
|
||||
propertyAccessorSymbol().getJvmNameFromAnnotation(accessorSite) ?: run {
|
||||
val symbol = propertySymbol()
|
||||
val defaultName = symbol.name.identifier.let {
|
||||
if (containingClass.isAnnotationType) it else it.abiName()
|
||||
if (this@SymbolLightAccessorMethod.containingClass.isAnnotationType) it else it.abiName()
|
||||
}
|
||||
|
||||
symbol.computeJvmMethodName(defaultName, containingClass, accessorSite)
|
||||
symbol.computeJvmMethodName(defaultName, this@SymbolLightAccessorMethod.containingClass, accessorSite)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -196,7 +196,7 @@ internal class SymbolLightAccessorMethod private constructor(
|
||||
),
|
||||
additionalAnnotationsProvider = NullabilityAnnotationsProvider {
|
||||
val nullabilityApplicable = isGetter &&
|
||||
!(isParameter && containingClass.isAnnotationType) &&
|
||||
!(isParameter && this.containingClass.isAnnotationType) &&
|
||||
!modifierList.hasModifierProperty(PsiModifier.PRIVATE)
|
||||
|
||||
if (nullabilityApplicable) {
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ internal class SymbolLightConstructor(
|
||||
override fun getTypeParameters(): Array<PsiTypeParameter> = PsiTypeParameter.EMPTY_ARRAY
|
||||
|
||||
private val _modifierList: PsiModifierList by lazyPub {
|
||||
val initialValue = if (containingClass is SymbolLightClassForEnumEntry) {
|
||||
val initialValue = if (this.containingClass is SymbolLightClassForEnumEntry) {
|
||||
LazyModifiersBox.VISIBILITY_MODIFIERS_MAP.with(PsiModifier.PACKAGE_LOCAL)
|
||||
} else {
|
||||
emptyMap()
|
||||
|
||||
+6
-2
@@ -47,7 +47,11 @@ internal class SymbolLightSimpleMethod(
|
||||
) {
|
||||
private val _name: String by lazyPub {
|
||||
withFunctionSymbol { functionSymbol ->
|
||||
functionSymbol.computeJvmMethodName(functionSymbol.name.asString(), containingClass, annotationUseSiteTarget = null)
|
||||
functionSymbol.computeJvmMethodName(
|
||||
functionSymbol.name.asString(),
|
||||
this@SymbolLightSimpleMethod.containingClass,
|
||||
annotationUseSiteTarget = null,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,7 +192,7 @@ internal class SymbolLightSimpleMethod(
|
||||
this@SymbolLightSimpleMethod,
|
||||
allowErrorTypes = true,
|
||||
KtTypeMappingMode.RETURN_TYPE,
|
||||
containingClass.isAnnotationType,
|
||||
this@SymbolLightSimpleMethod.containingClass.isAnnotationType,
|
||||
)
|
||||
} ?: nonExistentType()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user