Rework const val generation in multifile classes
Do not query MultifileClassCodegen#classBuilder early on: this causes the class file for the facade to be prematurely dumped to the disk in some cases, when that class file is not yet completely generated. Instead fork the logic in PropertyCodegen#generateSyntheticMethodIfNeeded: save metadata in parts, generate method in the facade
This commit is contained in:
@@ -73,7 +73,7 @@ class MultifileClassCodegen(
|
|||||||
private fun getDeserializedCallables(compiledPackageFragment: PackageFragmentDescriptor) =
|
private fun getDeserializedCallables(compiledPackageFragment: PackageFragmentDescriptor) =
|
||||||
compiledPackageFragment.getMemberScope().getContributedDescriptors(DescriptorKindFilter.CALLABLES, MemberScope.ALL_NAME_FILTER).filterIsInstance<DeserializedCallableMemberDescriptor>()
|
compiledPackageFragment.getMemberScope().getContributedDescriptors(DescriptorKindFilter.CALLABLES, MemberScope.ALL_NAME_FILTER).filterIsInstance<DeserializedCallableMemberDescriptor>()
|
||||||
|
|
||||||
val classBuilder = ClassBuilderOnDemand {
|
private val classBuilder = ClassBuilderOnDemand {
|
||||||
val originFile = files.firstOrNull()
|
val originFile = files.firstOrNull()
|
||||||
val actualPackageFragment = packageFragment ?:
|
val actualPackageFragment = packageFragment ?:
|
||||||
compiledPackageFragment ?:
|
compiledPackageFragment ?:
|
||||||
@@ -163,7 +163,7 @@ class MultifileClassCodegen(
|
|||||||
var generatePart = false
|
var generatePart = false
|
||||||
val partClassInfo = state.fileClassesProvider.getFileClassInfo(file)
|
val partClassInfo = state.fileClassesProvider.getFileClassInfo(file)
|
||||||
val partType = AsmUtil.asmTypeByFqNameWithoutInnerClasses(partClassInfo.fileClassFqName)
|
val partType = AsmUtil.asmTypeByFqNameWithoutInnerClasses(partClassInfo.fileClassFqName)
|
||||||
val partContext = state.rootContext.intoMultifileClassPart(this, packageFragment, facadeClassType, partType, file)
|
val partContext = state.rootContext.intoMultifileClassPart(packageFragment, facadeClassType, partType, file)
|
||||||
|
|
||||||
for (declaration in file.declarations) {
|
for (declaration in file.declarations) {
|
||||||
when (declaration) {
|
when (declaration) {
|
||||||
|
|||||||
@@ -119,11 +119,8 @@ public class PropertyCodegen {
|
|||||||
assert kind == OwnerKind.PACKAGE || kind == OwnerKind.IMPLEMENTATION || kind == OwnerKind.DEFAULT_IMPLS
|
assert kind == OwnerKind.PACKAGE || kind == OwnerKind.IMPLEMENTATION || kind == OwnerKind.DEFAULT_IMPLS
|
||||||
: "Generating property with a wrong kind (" + kind + "): " + descriptor;
|
: "Generating property with a wrong kind (" + kind + "): " + descriptor;
|
||||||
|
|
||||||
if (CodegenContextUtil.isImplClassOwner(context)) {
|
assert declaration != null : "Declaration is null: " + descriptor + " (context=" + context + ")";
|
||||||
assert declaration != null : "Declaration is null for different context: " + context;
|
genBackingFieldAndAnnotations(declaration, descriptor, false);
|
||||||
|
|
||||||
genBackingFieldAndAnnotations(declaration, descriptor, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isAccessorNeeded(declaration, descriptor, getter)) {
|
if (isAccessorNeeded(declaration, descriptor, getter)) {
|
||||||
generateGetter(declaration, descriptor, getter);
|
generateGetter(declaration, descriptor, getter);
|
||||||
@@ -134,9 +131,6 @@ public class PropertyCodegen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void genBackingFieldAndAnnotations(@NotNull KtNamedDeclaration declaration, @NotNull PropertyDescriptor descriptor, boolean isParameter) {
|
private void genBackingFieldAndAnnotations(@NotNull KtNamedDeclaration declaration, @NotNull PropertyDescriptor descriptor, boolean isParameter) {
|
||||||
ClassBuilder builder = getCorrectClassBuilder(descriptor);
|
|
||||||
if (builder == null) return;
|
|
||||||
|
|
||||||
boolean hasBackingField = hasBackingField(declaration, descriptor);
|
boolean hasBackingField = hasBackingField(declaration, descriptor);
|
||||||
boolean hasDelegate = declaration instanceof KtProperty && ((KtProperty) declaration).hasDelegate();
|
boolean hasDelegate = declaration instanceof KtProperty && ((KtProperty) declaration).hasDelegate();
|
||||||
|
|
||||||
@@ -145,21 +139,23 @@ public class PropertyCodegen {
|
|||||||
descriptor.getAnnotations(),
|
descriptor.getAnnotations(),
|
||||||
AnnotationSplitter.getTargetSet(isParameter, descriptor.isVar(), hasBackingField, hasDelegate));
|
AnnotationSplitter.getTargetSet(isParameter, descriptor.isVar(), hasBackingField, hasDelegate));
|
||||||
|
|
||||||
Annotations fieldAnnotations = annotationSplitter.getAnnotationsForTarget(AnnotationUseSiteTarget.FIELD);
|
|
||||||
Annotations delegateAnnotations = annotationSplitter.getAnnotationsForTarget(AnnotationUseSiteTarget.PROPERTY_DELEGATE_FIELD);
|
|
||||||
Annotations propertyAnnotations = annotationSplitter.getAnnotationsForTarget(AnnotationUseSiteTarget.PROPERTY);
|
Annotations propertyAnnotations = annotationSplitter.getAnnotationsForTarget(AnnotationUseSiteTarget.PROPERTY);
|
||||||
|
|
||||||
generateBackingField(builder, declaration, descriptor, fieldAnnotations, delegateAnnotations);
|
// Fields and '$annotations' methods for const properties are generated in the multi-file facade
|
||||||
generateSyntheticMethodIfNeeded(builder, descriptor, propertyAnnotations);
|
boolean isBackingFieldOwner =
|
||||||
}
|
descriptor.isConst() ? !(context instanceof MultifileClassPartContext) : CodegenContextUtil.isImplClassOwner(context);
|
||||||
|
|
||||||
@Nullable
|
if (isBackingFieldOwner) {
|
||||||
private ClassBuilder getCorrectClassBuilder(@NotNull PropertyDescriptor descriptor) {
|
Annotations fieldAnnotations = annotationSplitter.getAnnotationsForTarget(AnnotationUseSiteTarget.FIELD);
|
||||||
if (descriptor.isConst() && context instanceof MultifileClassPartContext) {
|
Annotations delegateAnnotations = annotationSplitter.getAnnotationsForTarget(AnnotationUseSiteTarget.PROPERTY_DELEGATE_FIELD);
|
||||||
return ((MultifileClassPartContext) context).getMultifileClassCodegen().getClassBuilder();
|
generateBackingField(declaration, descriptor, fieldAnnotations, delegateAnnotations);
|
||||||
|
generateSyntheticMethodIfNeeded(descriptor, propertyAnnotations);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.v;
|
if (!propertyAnnotations.getAllAnnotations().isEmpty() && kind != OwnerKind.DEFAULT_IMPLS &&
|
||||||
|
CodegenContextUtil.isImplClassOwner(context)) {
|
||||||
|
v.getSerializationBindings().put(SYNTHETIC_METHOD_FOR_PROPERTY, descriptor, getSyntheticMethodSignature(descriptor));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -245,7 +241,6 @@ public class PropertyCodegen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean generateBackingField(
|
private boolean generateBackingField(
|
||||||
@NotNull ClassBuilder builder,
|
|
||||||
@NotNull KtNamedDeclaration p,
|
@NotNull KtNamedDeclaration p,
|
||||||
@NotNull PropertyDescriptor descriptor,
|
@NotNull PropertyDescriptor descriptor,
|
||||||
@NotNull Annotations backingFieldAnnotations,
|
@NotNull Annotations backingFieldAnnotations,
|
||||||
@@ -256,10 +251,10 @@ public class PropertyCodegen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (p instanceof KtProperty && ((KtProperty) p).hasDelegate()) {
|
if (p instanceof KtProperty && ((KtProperty) p).hasDelegate()) {
|
||||||
generatePropertyDelegateAccess(builder, (KtProperty) p, descriptor, delegateAnnotations);
|
generatePropertyDelegateAccess((KtProperty) p, descriptor, delegateAnnotations);
|
||||||
}
|
}
|
||||||
else if (Boolean.TRUE.equals(bindingContext.get(BindingContext.BACKING_FIELD_REQUIRED, descriptor))) {
|
else if (Boolean.TRUE.equals(bindingContext.get(BindingContext.BACKING_FIELD_REQUIRED, descriptor))) {
|
||||||
generateBackingFieldAccess(builder, p, descriptor, backingFieldAnnotations);
|
generateBackingFieldAccess(p, descriptor, backingFieldAnnotations);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return false;
|
return false;
|
||||||
@@ -269,29 +264,20 @@ public class PropertyCodegen {
|
|||||||
|
|
||||||
// Annotations on properties are stored in bytecode on an empty synthetic method. This way they're still
|
// Annotations on properties are stored in bytecode on an empty synthetic method. This way they're still
|
||||||
// accessible via reflection, and 'deprecated' and 'private' flags prevent this method from being called accidentally
|
// accessible via reflection, and 'deprecated' and 'private' flags prevent this method from being called accidentally
|
||||||
private void generateSyntheticMethodIfNeeded(
|
private void generateSyntheticMethodIfNeeded(@NotNull PropertyDescriptor descriptor, @NotNull Annotations annotations) {
|
||||||
@NotNull ClassBuilder builder,
|
|
||||||
@NotNull PropertyDescriptor descriptor,
|
|
||||||
@NotNull Annotations annotations
|
|
||||||
) {
|
|
||||||
if (annotations.getAllAnnotations().isEmpty()) return;
|
if (annotations.getAllAnnotations().isEmpty()) return;
|
||||||
|
|
||||||
Method syntheticMethod = getSyntheticMethodSignature(descriptor);
|
|
||||||
|
|
||||||
if (!isInterface(context.getContextDescriptor()) || kind == OwnerKind.DEFAULT_IMPLS) {
|
if (!isInterface(context.getContextDescriptor()) || kind == OwnerKind.DEFAULT_IMPLS) {
|
||||||
int flags = ACC_DEPRECATED | ACC_FINAL | ACC_PRIVATE | ACC_STATIC | ACC_SYNTHETIC;
|
int flags = ACC_DEPRECATED | ACC_FINAL | ACC_PRIVATE | ACC_STATIC | ACC_SYNTHETIC;
|
||||||
MethodVisitor mv = builder.newMethod(JvmDeclarationOriginKt.OtherOrigin(descriptor), flags, syntheticMethod.getName(),
|
Method syntheticMethod = getSyntheticMethodSignature(descriptor);
|
||||||
syntheticMethod.getDescriptor(), null, null);
|
MethodVisitor mv = v.newMethod(JvmDeclarationOriginKt.OtherOrigin(descriptor), flags, syntheticMethod.getName(),
|
||||||
|
syntheticMethod.getDescriptor(), null, null);
|
||||||
AnnotationCodegen.forMethod(mv, typeMapper)
|
AnnotationCodegen.forMethod(mv, typeMapper)
|
||||||
.genAnnotations(new AnnotatedSimple(annotations), Type.VOID_TYPE, AnnotationUseSiteTarget.PROPERTY);
|
.genAnnotations(new AnnotatedSimple(annotations), Type.VOID_TYPE, AnnotationUseSiteTarget.PROPERTY);
|
||||||
mv.visitCode();
|
mv.visitCode();
|
||||||
mv.visitInsn(Opcodes.RETURN);
|
mv.visitInsn(Opcodes.RETURN);
|
||||||
mv.visitEnd();
|
mv.visitEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kind != OwnerKind.DEFAULT_IMPLS) {
|
|
||||||
v.getSerializationBindings().put(SYNTHETIC_METHOD_FOR_PROPERTY, descriptor, syntheticMethod);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@@ -303,7 +289,6 @@ public class PropertyCodegen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void generateBackingField(
|
private void generateBackingField(
|
||||||
ClassBuilder builder,
|
|
||||||
KtNamedDeclaration element,
|
KtNamedDeclaration element,
|
||||||
PropertyDescriptor propertyDescriptor,
|
PropertyDescriptor propertyDescriptor,
|
||||||
boolean isDelegate,
|
boolean isDelegate,
|
||||||
@@ -333,6 +318,8 @@ public class PropertyCodegen {
|
|||||||
|
|
||||||
Type type = typeMapper.mapType(kotlinType);
|
Type type = typeMapper.mapType(kotlinType);
|
||||||
|
|
||||||
|
ClassBuilder builder = v;
|
||||||
|
|
||||||
FieldOwnerContext backingFieldContext = context;
|
FieldOwnerContext backingFieldContext = context;
|
||||||
if (AsmUtil.isInstancePropertyWithStaticBackingField(propertyDescriptor) ) {
|
if (AsmUtil.isInstancePropertyWithStaticBackingField(propertyDescriptor) ) {
|
||||||
modifiers |= ACC_STATIC;
|
modifiers |= ACC_STATIC;
|
||||||
@@ -365,7 +352,6 @@ public class PropertyCodegen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void generatePropertyDelegateAccess(
|
private void generatePropertyDelegateAccess(
|
||||||
@NotNull ClassBuilder builder,
|
|
||||||
@NotNull KtProperty p,
|
@NotNull KtProperty p,
|
||||||
@NotNull PropertyDescriptor propertyDescriptor,
|
@NotNull PropertyDescriptor propertyDescriptor,
|
||||||
@NotNull Annotations annotations
|
@NotNull Annotations annotations
|
||||||
@@ -377,11 +363,10 @@ public class PropertyCodegen {
|
|||||||
delegateType = ErrorUtils.createErrorType("Delegate type");
|
delegateType = ErrorUtils.createErrorType("Delegate type");
|
||||||
}
|
}
|
||||||
|
|
||||||
generateBackingField(builder, p, propertyDescriptor, true, delegateType, null, annotations);
|
generateBackingField(p, propertyDescriptor, true, delegateType, null, annotations);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void generateBackingFieldAccess(
|
private void generateBackingFieldAccess(
|
||||||
@NotNull ClassBuilder builder,
|
|
||||||
@NotNull KtNamedDeclaration p,
|
@NotNull KtNamedDeclaration p,
|
||||||
@NotNull PropertyDescriptor propertyDescriptor,
|
@NotNull PropertyDescriptor propertyDescriptor,
|
||||||
@NotNull Annotations annotations
|
@NotNull Annotations annotations
|
||||||
@@ -395,7 +380,7 @@ public class PropertyCodegen {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
generateBackingField(builder, p, propertyDescriptor, false, propertyDescriptor.getType(), value, annotations);
|
generateBackingField(p, propertyDescriptor, false, propertyDescriptor.getType(), value, annotations);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean shouldWriteFieldInitializer(@NotNull PropertyDescriptor descriptor) {
|
private boolean shouldWriteFieldInitializer(@NotNull PropertyDescriptor descriptor) {
|
||||||
|
|||||||
@@ -251,13 +251,12 @@ public abstract class CodegenContext<T extends DeclarationDescriptor> {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public FieldOwnerContext<PackageFragmentDescriptor> intoMultifileClassPart(
|
public FieldOwnerContext<PackageFragmentDescriptor> intoMultifileClassPart(
|
||||||
@NotNull MultifileClassCodegen codegen,
|
|
||||||
@NotNull PackageFragmentDescriptor descriptor,
|
@NotNull PackageFragmentDescriptor descriptor,
|
||||||
@NotNull Type multifileClassType,
|
@NotNull Type multifileClassType,
|
||||||
@NotNull Type filePartType,
|
@NotNull Type filePartType,
|
||||||
@NotNull KtFile sourceFile
|
@NotNull KtFile sourceFile
|
||||||
) {
|
) {
|
||||||
return new MultifileClassPartContext(codegen, descriptor, this, multifileClassType, filePartType, sourceFile);
|
return new MultifileClassPartContext(descriptor, this, multifileClassType, filePartType, sourceFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
-9
@@ -18,17 +18,14 @@ package org.jetbrains.kotlin.codegen.context;
|
|||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.kotlin.codegen.MultifileClassCodegen;
|
|
||||||
import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor;
|
import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor;
|
||||||
import org.jetbrains.kotlin.psi.KtFile;
|
import org.jetbrains.kotlin.psi.KtFile;
|
||||||
import org.jetbrains.org.objectweb.asm.Type;
|
import org.jetbrains.org.objectweb.asm.Type;
|
||||||
|
|
||||||
public class MultifileClassPartContext extends MultifileClassContextBase implements DelegatingToPartContext, FacadePartWithSourceFile {
|
public class MultifileClassPartContext extends MultifileClassContextBase implements DelegatingToPartContext, FacadePartWithSourceFile {
|
||||||
private final KtFile sourceFile;
|
private final KtFile sourceFile;
|
||||||
private final MultifileClassCodegen codegen;
|
|
||||||
|
|
||||||
public MultifileClassPartContext(
|
public MultifileClassPartContext(
|
||||||
@NotNull MultifileClassCodegen codegen,
|
|
||||||
PackageFragmentDescriptor descriptor,
|
PackageFragmentDescriptor descriptor,
|
||||||
CodegenContext parent,
|
CodegenContext parent,
|
||||||
Type multifileClassType,
|
Type multifileClassType,
|
||||||
@@ -37,7 +34,6 @@ public class MultifileClassPartContext extends MultifileClassContextBase impleme
|
|||||||
) {
|
) {
|
||||||
super(descriptor, parent, multifileClassType, filePartType);
|
super(descriptor, parent, multifileClassType, filePartType);
|
||||||
this.sourceFile = sourceFile;
|
this.sourceFile = sourceFile;
|
||||||
this.codegen = codegen;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -51,9 +47,4 @@ public class MultifileClassPartContext extends MultifileClassContextBase impleme
|
|||||||
public KtFile getSourceFile() {
|
public KtFile getSourceFile() {
|
||||||
return sourceFile;
|
return sourceFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
public MultifileClassCodegen getMultifileClassCodegen() {
|
|
||||||
return codegen;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,12 +42,11 @@
|
|||||||
"declaration": "package-fragment ",
|
"declaration": "package-fragment ",
|
||||||
"class": "MultifileFacade",
|
"class": "MultifileFacade",
|
||||||
"members": [
|
"members": [
|
||||||
{"visibility": "public", "declaration": "const val publicConst: kotlin.Int", "name": "publicConst", "desc": "I"},
|
|
||||||
{"visibility": "internal", "declaration": "const val internalConst: kotlin.Int", "name": "internalConst", "desc": "I"},
|
{"visibility": "internal", "declaration": "const val internalConst: kotlin.Int", "name": "internalConst", "desc": "I"},
|
||||||
{"visibility": "private", "declaration": "const val privateConst: kotlin.Int", "name": "privateConst", "desc": "I"},
|
|
||||||
{"visibility": "internal", "declaration": "fun <get-internalVal>(): kotlin.Long", "name": "getInternalVal", "desc": "()J"},
|
{"visibility": "internal", "declaration": "fun <get-internalVal>(): kotlin.Long", "name": "getInternalVal", "desc": "()J"},
|
||||||
{"visibility": "internal", "declaration": "fun <get-internalVar>(): kotlin.Long", "name": "getInternalVar", "desc": "()J"},
|
{"visibility": "internal", "declaration": "fun <get-internalVar>(): kotlin.Long", "name": "getInternalVar", "desc": "()J"},
|
||||||
{"visibility": "internal", "declaration": "fun <set-internalVar>(<set-?>: kotlin.Long): kotlin.Unit", "name": "setInternalVar", "desc": "(J)V"},
|
{"visibility": "internal", "declaration": "fun <set-internalVar>(<set-?>: kotlin.Long): kotlin.Unit", "name": "setInternalVar", "desc": "(J)V"},
|
||||||
|
{"visibility": "public", "declaration": "const val publicConst: kotlin.Int", "name": "publicConst", "desc": "I"},
|
||||||
{"visibility": "public", "declaration": "fun <get-publicVal>(): kotlin.Int", "name": "getPublicVal", "desc": "()I"},
|
{"visibility": "public", "declaration": "fun <get-publicVal>(): kotlin.Int", "name": "getPublicVal", "desc": "()I"},
|
||||||
{"visibility": "public", "declaration": "fun <get-publicVar>(): kotlin.Int", "name": "getPublicVar", "desc": "()I"},
|
{"visibility": "public", "declaration": "fun <get-publicVar>(): kotlin.Int", "name": "getPublicVar", "desc": "()I"},
|
||||||
{"visibility": "public", "declaration": "fun <set-publicVar>(<set-?>: kotlin.Int): kotlin.Unit", "name": "setPublicVar", "desc": "(I)V"},
|
{"visibility": "public", "declaration": "fun <set-publicVar>(<set-?>: kotlin.Int): kotlin.Unit", "name": "setPublicVar", "desc": "(I)V"},
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ public fun fn1b(): kotlin.Unit { /* compiled code */ }
|
|||||||
|
|
||||||
public fun kotlin.String.fn2b(): kotlin.Unit { /* compiled code */ }
|
public fun kotlin.String.fn2b(): kotlin.Unit { /* compiled code */ }
|
||||||
|
|
||||||
|
@kotlin.Deprecated public const val annotatedConstVal: kotlin.Int /* compiled code */
|
||||||
|
|
||||||
public val val1a: kotlin.Int /* compiled code */
|
public val val1a: kotlin.Int /* compiled code */
|
||||||
|
|
||||||
private val kotlin.String.val2a: kotlin.Int /* compiled code */
|
private val kotlin.String.val2a: kotlin.Int /* compiled code */
|
||||||
|
|||||||
@@ -9,3 +9,6 @@ public fun String.fn2a() {}
|
|||||||
|
|
||||||
class ShouldNotBeVisible1
|
class ShouldNotBeVisible1
|
||||||
interface ShouldNotBeVisible2
|
interface ShouldNotBeVisible2
|
||||||
|
|
||||||
|
@Deprecated("deprecated")
|
||||||
|
const val annotatedConstVal = 42
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ fun p1Fun() {}
|
|||||||
fun String.p1ExtFun() {}
|
fun String.p1ExtFun() {}
|
||||||
fun p1ExprFun(): Int = 0
|
fun p1ExprFun(): Int = 0
|
||||||
fun p1FunWithParams(x: Int): Int { return x }
|
fun p1FunWithParams(x: Int): Int { return x }
|
||||||
|
|
||||||
val p1Val: Int = 0
|
val p1Val: Int = 0
|
||||||
val String.p1ExtVal: Int get() = 0
|
val String.p1ExtVal: Int get() = 0
|
||||||
var p1Var: Int = 0
|
var p1Var: Int = 0
|
||||||
|
|
||||||
|
@Deprecated("deprecated")
|
||||||
|
const val annotatedConstVal = 42
|
||||||
|
|||||||
@@ -2,6 +2,20 @@ PsiJetFileStubImpl[package=test]
|
|||||||
PACKAGE_DIRECTIVE:
|
PACKAGE_DIRECTIVE:
|
||||||
REFERENCE_EXPRESSION:[referencedName=test]
|
REFERENCE_EXPRESSION:[referencedName=test]
|
||||||
IMPORT_LIST:
|
IMPORT_LIST:
|
||||||
|
PROPERTY:[fqName=test.annotatedConstVal, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReturnTypeRef=true, isExtension=false, isTopLevel=true, isVar=false, name=annotatedConstVal]
|
||||||
|
MODIFIER_LIST:[public const]
|
||||||
|
ANNOTATION_ENTRY:[hasValueArguments=false, shortName=Deprecated]
|
||||||
|
CONSTRUCTOR_CALLEE:
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Deprecated]
|
||||||
|
TYPE_REFERENCE:
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||||
|
REFERENCE_EXPRESSION:[referencedName=Int]
|
||||||
PROPERTY:[fqName=test.p1Val, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReturnTypeRef=true, isExtension=false, isTopLevel=true, isVar=false, name=p1Val]
|
PROPERTY:[fqName=test.p1Val, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReturnTypeRef=true, isExtension=false, isTopLevel=true, isVar=false, name=p1Val]
|
||||||
MODIFIER_LIST:[public]
|
MODIFIER_LIST:[public]
|
||||||
TYPE_REFERENCE:
|
TYPE_REFERENCE:
|
||||||
|
|||||||
Reference in New Issue
Block a user