[FIR IDE] LC Implement special keywords like transient, volatile, synchronized, strictfp

This commit is contained in:
Igor Yakovlev
2020-11-23 22:26:21 +03:00
parent 6aff96a401
commit aff90b335c
2 changed files with 12 additions and 0 deletions
@@ -72,6 +72,12 @@ internal class FirLightFieldForPropertySymbol(
val modifiers = modifiersWithVisibility.add(
what = PsiModifier.FINAL,
`if` = !suppressFinal
).add(
what = PsiModifier.TRANSIENT,
`if` = propertySymbol.hasAnnotation("kotlin/jvm/Transient", null)
).add(
what = PsiModifier.VOLATILE,
`if` = propertySymbol.hasAnnotation("kotlin/jvm/Volatile", null)
)
val nullability = if (visibility != PsiModifier.PRIVATE)
@@ -94,6 +94,12 @@ internal class FirLightSimpleMethodForSymbol(
modifiers.add(
what = PsiModifier.STATIC,
`if` = functionSymbol.hasJvmStaticAnnotation()
).add(
what = PsiModifier.STRICTFP,
`if` = functionSymbol.hasAnnotation("kotlin/jvm/Strictfp", null)
).add(
what = PsiModifier.SYNCHRONIZED,
`if` = functionSymbol.hasAnnotation("kotlin/jvm/Synchronized", null)
)
}