Parse some builtin annotations as modifiers
But still resolve them as annotations. Mostly it's needed as begin of migration path, one day they become modifiers anyway Some tests are dropped because they supposed that `annotation` should have parameter
This commit is contained in:
@@ -260,7 +260,7 @@ public interface Errors {
|
||||
DiagnosticFactory2<JetModifierListOwner, CallableMemberDescriptor, CallableDescriptor> CANNOT_OVERRIDE_INVISIBLE_MEMBER =
|
||||
DiagnosticFactory2.create(ERROR, OVERRIDE_MODIFIER);
|
||||
|
||||
DiagnosticFactory2<JetAnnotationEntry, CallableMemberDescriptor, DeclarationDescriptor> DATA_CLASS_OVERRIDE_CONFLICT =
|
||||
DiagnosticFactory2<PsiElement, CallableMemberDescriptor, DeclarationDescriptor> DATA_CLASS_OVERRIDE_CONFLICT =
|
||||
DiagnosticFactory2.create(ERROR);
|
||||
|
||||
DiagnosticFactory1<JetDeclaration, CallableMemberDescriptor> CANNOT_INFER_VISIBILITY =
|
||||
|
||||
@@ -170,6 +170,13 @@ public interface JetTokens {
|
||||
|
||||
JetModifierKeywordToken LATE_INIT_KEYWORD = JetModifierKeywordToken.softKeywordModifier("lateinit");
|
||||
|
||||
JetModifierKeywordToken DATA_KEYWORD = JetModifierKeywordToken.softKeywordModifier("data");
|
||||
JetModifierKeywordToken INLINE_KEYWORD = JetModifierKeywordToken.softKeywordModifier("inline");
|
||||
JetModifierKeywordToken NOINLINE_KEYWORD = JetModifierKeywordToken.softKeywordModifier("noinline");
|
||||
JetModifierKeywordToken TAILREC_KEYWORD = JetModifierKeywordToken.softKeywordModifier("tailrec");
|
||||
JetModifierKeywordToken EXTERNAL_KEYWORD = JetModifierKeywordToken.softKeywordModifier("external");
|
||||
JetModifierKeywordToken ANNOTATION_KEYWORD = JetModifierKeywordToken.softKeywordModifier("annotation");
|
||||
|
||||
TokenSet KEYWORDS = TokenSet.create(PACKAGE_KEYWORD, AS_KEYWORD, TYPE_ALIAS_KEYWORD, CLASS_KEYWORD, TRAIT_KEYWORD, INTERFACE_KEYWORD,
|
||||
THIS_KEYWORD, SUPER_KEYWORD, VAL_KEYWORD, VAR_KEYWORD, FUN_KEYWORD, FOR_KEYWORD,
|
||||
NULL_KEYWORD,
|
||||
@@ -185,7 +192,9 @@ public interface JetTokens {
|
||||
CATCH_KEYWORD, FINALLY_KEYWORD, OUT_KEYWORD, FINAL_KEYWORD, VARARG_KEYWORD, REIFIED_KEYWORD,
|
||||
DYNAMIC_KEYWORD, COMPANION_KEYWORD, CONSTRUCTOR_KEYWORD, INIT_KEYWORD, SEALED_KEYWORD,
|
||||
FIELD_KEYWORD, PROPERTY_KEYWORD, RECEIVER_KEYWORD, PARAM_KEYWORD, SPARAM_KEYWORD,
|
||||
LATE_INIT_KEYWORD
|
||||
LATE_INIT_KEYWORD,
|
||||
DATA_KEYWORD, INLINE_KEYWORD, NOINLINE_KEYWORD, TAILREC_KEYWORD, EXTERNAL_KEYWORD,
|
||||
ANNOTATION_KEYWORD
|
||||
);
|
||||
|
||||
/*
|
||||
@@ -197,9 +206,17 @@ public interface JetTokens {
|
||||
new JetModifierKeywordToken[] {
|
||||
ABSTRACT_KEYWORD, ENUM_KEYWORD, OPEN_KEYWORD, INNER_KEYWORD, OVERRIDE_KEYWORD, PRIVATE_KEYWORD,
|
||||
PUBLIC_KEYWORD, INTERNAL_KEYWORD, PROTECTED_KEYWORD, OUT_KEYWORD, IN_KEYWORD, FINAL_KEYWORD, VARARG_KEYWORD,
|
||||
REIFIED_KEYWORD, COMPANION_KEYWORD, SEALED_KEYWORD, LATE_INIT_KEYWORD
|
||||
REIFIED_KEYWORD, COMPANION_KEYWORD, SEALED_KEYWORD, LATE_INIT_KEYWORD,
|
||||
DATA_KEYWORD, INLINE_KEYWORD, NOINLINE_KEYWORD, TAILREC_KEYWORD, EXTERNAL_KEYWORD, ANNOTATION_KEYWORD
|
||||
};
|
||||
|
||||
// Please synchronize this array with org.jetbrains.kotlin.descriptors.annotations.ANNOTATION_MODIFIERS_FQ_NAMES
|
||||
JetModifierKeywordToken[] ANNOTATION_MODIFIERS_KEYWORDS_ARRAY = new JetModifierKeywordToken[] {
|
||||
DATA_KEYWORD, INLINE_KEYWORD, NOINLINE_KEYWORD, TAILREC_KEYWORD, EXTERNAL_KEYWORD, ANNOTATION_KEYWORD
|
||||
};
|
||||
|
||||
TokenSet ANNOTATION_MODIFIERS_KEYWORDS = TokenSet.create(ANNOTATION_MODIFIERS_KEYWORDS_ARRAY);
|
||||
|
||||
TokenSet MODIFIER_KEYWORDS = TokenSet.create(MODIFIER_KEYWORDS_ARRAY);
|
||||
|
||||
TokenSet VISIBILITY_MODIFIERS = TokenSet.create(PRIVATE_KEYWORD, PUBLIC_KEYWORD, INTERNAL_KEYWORD, PROTECTED_KEYWORD);
|
||||
|
||||
@@ -485,6 +485,11 @@ public class JetParsing extends AbstractJetParsing {
|
||||
|
||||
if (at(AT) && !WHITE_SPACE_OR_COMMENT_BIT_SET.contains(myBuilder.rawLookup(1))) {
|
||||
advance(); // AT
|
||||
if (atSet(ANNOTATION_MODIFIERS_KEYWORDS)) {
|
||||
myBuilder.remapCurrentToken(IDENTIFIER);
|
||||
marker.rollbackTo();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (atSet(MODIFIER_KEYWORDS)) {
|
||||
|
||||
@@ -110,9 +110,8 @@ abstract public class JetClassOrObject :
|
||||
public fun getSecondaryConstructors(): List<JetSecondaryConstructor> = getBody()?.getSecondaryConstructors().orEmpty()
|
||||
|
||||
deprecated(value = "It's no more possible to determine it exactly using AST. Use ClassDescriptor.getKind() instead")
|
||||
public fun isAnnotation(): Boolean = getBuiltInAnnotationEntry() != null
|
||||
|
||||
public fun getBuiltInAnnotationEntry(): JetAnnotationEntry? = getAnnotation(KotlinBuiltIns.FQ_NAMES.annotation.shortName().asString())
|
||||
public fun isAnnotation(): Boolean =
|
||||
getAnnotation(KotlinBuiltIns.FQ_NAMES.annotation.shortName().asString()) != null || hasModifier(JetTokens.ANNOTATION_KEYWORD)
|
||||
|
||||
private fun getAnnotation(name: String): JetAnnotationEntry? {
|
||||
return getAnnotationEntries().firstOrNull() { entry ->
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ import org.jetbrains.kotlin.psi.stubs.impl.KotlinFileStubImpl;
|
||||
import java.io.IOException;
|
||||
|
||||
public class JetFileElementType extends IStubFileElementType<KotlinFileStub> {
|
||||
public static final int STUB_VERSION = 53;
|
||||
public static final int STUB_VERSION = 54;
|
||||
|
||||
private static final String NAME = "kotlin.FILE";
|
||||
|
||||
|
||||
@@ -16,16 +16,17 @@
|
||||
|
||||
package org.jetbrains.kotlin.resolve;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns;
|
||||
import org.jetbrains.kotlin.descriptors.*;
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationWithTarget;
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations;
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationsImpl;
|
||||
import org.jetbrains.kotlin.descriptors.annotations.*;
|
||||
import org.jetbrains.kotlin.diagnostics.Errors;
|
||||
import org.jetbrains.kotlin.lexer.JetModifierKeywordToken;
|
||||
import org.jetbrains.kotlin.lexer.JetTokens;
|
||||
import org.jetbrains.kotlin.psi.*;
|
||||
import org.jetbrains.kotlin.resolve.annotations.*;
|
||||
import org.jetbrains.kotlin.resolve.annotations.AnnotationsPackage;
|
||||
import org.jetbrains.kotlin.resolve.calls.CallResolver;
|
||||
import org.jetbrains.kotlin.resolve.calls.model.ResolvedValueArgument;
|
||||
import org.jetbrains.kotlin.resolve.calls.results.OverloadResolutionResults;
|
||||
@@ -44,7 +45,6 @@ import org.jetbrains.kotlin.types.JetType;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import static org.jetbrains.kotlin.diagnostics.Errors.NOT_AN_ANNOTATION_CLASS;
|
||||
@@ -56,16 +56,22 @@ public class AnnotationResolver {
|
||||
@NotNull private TypeResolver typeResolver;
|
||||
@NotNull private final ConstantExpressionEvaluator constantExpressionEvaluator;
|
||||
|
||||
@NotNull private final List<AnnotationDescriptor> modifiersAnnotations;
|
||||
|
||||
public AnnotationResolver(
|
||||
@NotNull CallResolver callResolver,
|
||||
@NotNull ConstantExpressionEvaluator constantExpressionEvaluator,
|
||||
@NotNull StorageManager storageManager
|
||||
@NotNull StorageManager storageManager,
|
||||
@NotNull KotlinBuiltIns kotlinBuiltIns
|
||||
) {
|
||||
this.callResolver = callResolver;
|
||||
this.constantExpressionEvaluator = constantExpressionEvaluator;
|
||||
this.storageManager = storageManager;
|
||||
|
||||
modifiersAnnotations = AnnotationsPackage.buildMigrationAnnotationDescriptors(kotlinBuiltIns);
|
||||
}
|
||||
|
||||
|
||||
// component dependency cycle
|
||||
@Inject
|
||||
public void setTypeResolver(@NotNull TypeResolver typeResolver) {
|
||||
@@ -120,7 +126,29 @@ public class AnnotationResolver {
|
||||
|
||||
List<JetAnnotationEntry> annotationEntryElements = modifierList.getAnnotationEntries();
|
||||
|
||||
return resolveAnnotationEntries(scope, annotationEntryElements, trace, shouldResolveArguments);
|
||||
return resolveAndAppendAnnotationsFromModifiers(
|
||||
resolveAnnotationEntries(scope, annotationEntryElements, trace, shouldResolveArguments),
|
||||
modifierList
|
||||
);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Annotations resolveAndAppendAnnotationsFromModifiers(
|
||||
@NotNull Annotations annotations,
|
||||
@NotNull JetModifierList modifierList
|
||||
) {
|
||||
List<AnnotationDescriptor> annotationFromModifiers = new ArrayList<AnnotationDescriptor>();
|
||||
|
||||
for (int i = 0; i < JetTokens.ANNOTATION_MODIFIERS_KEYWORDS_ARRAY.length; i++) {
|
||||
JetModifierKeywordToken modifier = JetTokens.ANNOTATION_MODIFIERS_KEYWORDS_ARRAY[i];
|
||||
if (modifierList.hasModifier(modifier)) {
|
||||
annotationFromModifiers.add(modifiersAnnotations.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
if (annotationFromModifiers.isEmpty()) return annotations;
|
||||
|
||||
return new CompositeAnnotations(annotations, new AnnotationsImpl(annotationFromModifiers));
|
||||
}
|
||||
|
||||
private Annotations resolveAnnotationEntries(
|
||||
|
||||
@@ -16,12 +16,16 @@
|
||||
|
||||
package org.jetbrains.kotlin.resolve.annotations
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.PropertyAccessorDescriptor
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptorImpl
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.lexer.JetTokens
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
||||
import org.jetbrains.kotlin.types.JetTypeImpl
|
||||
|
||||
public fun DeclarationDescriptor.hasInlineAnnotation(): Boolean {
|
||||
return getAnnotations().findAnnotation(FqName("kotlin.inline")) != null
|
||||
@@ -61,3 +65,20 @@ public fun AnnotationDescriptor.argumentValue(parameterName: String): Any? {
|
||||
.singleOrNull { it.key.getName().asString() == parameterName }
|
||||
?.value?.value
|
||||
}
|
||||
|
||||
public fun KotlinBuiltIns.buildMigrationAnnotationDescriptors(): List<AnnotationDescriptor> =
|
||||
JetTokens.ANNOTATION_MODIFIERS_KEYWORDS_ARRAY.map {
|
||||
modifierKeyword ->
|
||||
|
||||
val name = Name.identifier(modifierKeyword.value)
|
||||
val type = JetTypeImpl.create(
|
||||
Annotations.EMPTY,
|
||||
getBuiltInClassByNameNullable(name) ?: getAnnotationClassByName(name),
|
||||
/* nullable = */false, /* arguments = */emptyList()
|
||||
)
|
||||
|
||||
AnnotationDescriptorImpl(
|
||||
type,
|
||||
emptyMap(), SourceElement.NO_SOURCE
|
||||
)
|
||||
}
|
||||
|
||||
@@ -57,7 +57,13 @@ public object ModifierCheckerCore {
|
||||
REIFIED_KEYWORD to EnumSet.of(TYPE_PARAMETER),
|
||||
VARARG_KEYWORD to EnumSet.of(VALUE_PARAMETER, PROPERTY_PARAMETER),
|
||||
COMPANION_KEYWORD to EnumSet.of(OBJECT),
|
||||
LATE_INIT_KEYWORD to EnumSet.of(MEMBER_PROPERTY)
|
||||
LATE_INIT_KEYWORD to EnumSet.of(MEMBER_PROPERTY),
|
||||
DATA_KEYWORD to EnumSet.of(CLASSIFIER),
|
||||
INLINE_KEYWORD to EnumSet.of(FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER, PROPERTY),
|
||||
NOINLINE_KEYWORD to EnumSet.of(VALUE_PARAMETER),
|
||||
TAILREC_KEYWORD to EnumSet.of(FUNCTION),
|
||||
EXTERNAL_KEYWORD to EnumSet.of(FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER),
|
||||
ANNOTATION_KEYWORD to EnumSet.of(ANNOTATION_CLASS)
|
||||
)
|
||||
|
||||
// NOTE: redundant targets must be possible!
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.jetbrains.kotlin.builtins.KotlinBuiltIns;
|
||||
import org.jetbrains.kotlin.descriptors.*;
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor;
|
||||
import org.jetbrains.kotlin.incremental.components.NoLookupLocation;
|
||||
import org.jetbrains.kotlin.lexer.JetToken;
|
||||
import org.jetbrains.kotlin.lexer.JetTokens;
|
||||
import org.jetbrains.kotlin.name.Name;
|
||||
import org.jetbrains.kotlin.psi.*;
|
||||
@@ -668,7 +669,7 @@ public class OverrideResolver {
|
||||
}
|
||||
|
||||
private void checkOverrideForComponentFunction(@NotNull final CallableMemberDescriptor componentFunction) {
|
||||
final JetAnnotationEntry dataAnnotation = findDataAnnotationForDataClass(componentFunction.getContainingDeclaration());
|
||||
final PsiElement dataAnnotation = findDataAnnotationForDataClass(componentFunction.getContainingDeclaration());
|
||||
|
||||
checkOverridesForMemberMarkedOverride(componentFunction, false, new CheckOverrideReportStrategy() {
|
||||
private boolean overrideConflict = false;
|
||||
@@ -712,7 +713,7 @@ public class OverrideResolver {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static JetAnnotationEntry findDataAnnotationForDataClass(@NotNull DeclarationDescriptor dataClass) {
|
||||
private static PsiElement findDataAnnotationForDataClass(@NotNull DeclarationDescriptor dataClass) {
|
||||
AnnotationDescriptor annotation = dataClass.getAnnotations().findAnnotation(KotlinBuiltIns.FQ_NAMES.data);
|
||||
if (annotation != null) {
|
||||
JetAnnotationEntry entry = DescriptorToSourceUtils.getSourceFromAnnotation(annotation);
|
||||
@@ -720,6 +721,16 @@ public class OverrideResolver {
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
JetClass classDeclaration = (JetClass) DescriptorToSourceUtils.getSourceFromDescriptor(dataClass);
|
||||
if (classDeclaration != null && classDeclaration.getModifierList() != null) {
|
||||
PsiElement modifier = classDeclaration.getModifierList().getModifier(JetTokens.DATA_KEYWORD);
|
||||
if (modifier != null) {
|
||||
return modifier;
|
||||
}
|
||||
}
|
||||
|
||||
throw new IllegalStateException("No data annotation is found for data class " + dataClass);
|
||||
}
|
||||
|
||||
|
||||
+29
-14
@@ -29,6 +29,7 @@ import com.intellij.util.containers.FilteringIterator;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns;
|
||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor;
|
||||
import org.jetbrains.kotlin.diagnostics.Diagnostic;
|
||||
import org.jetbrains.kotlin.diagnostics.Severity;
|
||||
@@ -203,28 +204,42 @@ public class DiagnosticsWithSuppression implements Diagnostics {
|
||||
|
||||
private Set<String> getSuppressingStrings(@NotNull JetAnnotated annotated) {
|
||||
ImmutableSet.Builder<String> builder = ImmutableSet.builder();
|
||||
for (JetAnnotationEntry annotationEntry : annotated.getAnnotationEntries()) {
|
||||
AnnotationDescriptor annotationDescriptor = context.get(BindingContext.ANNOTATION, annotationEntry);
|
||||
if (annotationDescriptor == null) continue;
|
||||
|
||||
for (SuppressStringProvider suppressStringProvider : ADDITIONAL_SUPPRESS_STRING_PROVIDERS.get()) {
|
||||
builder.addAll(suppressStringProvider.get(annotationDescriptor));
|
||||
DeclarationDescriptor descriptor = context.get(BindingContext.DECLARATION_TO_DESCRIPTOR, annotated);
|
||||
|
||||
if (descriptor != null) {
|
||||
for (AnnotationDescriptor annotationDescriptor : descriptor.getAnnotations()) {
|
||||
processAnnotation(builder, annotationDescriptor);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (JetAnnotationEntry annotationEntry : annotated.getAnnotationEntries()) {
|
||||
AnnotationDescriptor annotationDescriptor = context.get(BindingContext.ANNOTATION, annotationEntry);
|
||||
processAnnotation(builder, annotationDescriptor);
|
||||
}
|
||||
}
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
if (!KotlinBuiltIns.isSuppressAnnotation(annotationDescriptor)) continue;
|
||||
private void processAnnotation(ImmutableSet.Builder<String> builder, AnnotationDescriptor annotationDescriptor) {
|
||||
if (annotationDescriptor == null) return;
|
||||
|
||||
// We only add strings and skip other values to facilitate recovery in presence of erroneous code
|
||||
for (ConstantValue<?> arrayValue : annotationDescriptor.getAllValueArguments().values()) {
|
||||
if ((arrayValue instanceof ArrayValue)) {
|
||||
for (ConstantValue<?> value : ((ArrayValue) arrayValue).getValue()) {
|
||||
if (value instanceof StringValue) {
|
||||
builder.add(String.valueOf(((StringValue) value).getValue()).toLowerCase());
|
||||
}
|
||||
for (SuppressStringProvider suppressStringProvider : ADDITIONAL_SUPPRESS_STRING_PROVIDERS.get()) {
|
||||
builder.addAll(suppressStringProvider.get(annotationDescriptor));
|
||||
}
|
||||
|
||||
if (!KotlinBuiltIns.isSuppressAnnotation(annotationDescriptor)) return;
|
||||
|
||||
// We only add strings and skip other values to facilitate recovery in presence of erroneous code
|
||||
for (ConstantValue<?> arrayValue : annotationDescriptor.getAllValueArguments().values()) {
|
||||
if ((arrayValue instanceof ArrayValue)) {
|
||||
for (ConstantValue<?> value : ((ArrayValue) arrayValue).getValue()) {
|
||||
if (value instanceof StringValue) {
|
||||
builder.add(String.valueOf(((StringValue) value).getValue()).toLowerCase());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
public static boolean isSuppressedByStrings(@NotNull Diagnostic diagnostic, @NotNull Set<String> strings) {
|
||||
|
||||
+5
-3
@@ -161,7 +161,7 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
|
||||
});
|
||||
|
||||
if (modifierList != null) {
|
||||
this.annotations = new LazyAnnotations(
|
||||
LazyAnnotations classAnnotations = new LazyAnnotations(
|
||||
new LazyAnnotationsContext(
|
||||
c.getAnnotationResolver(),
|
||||
storageManager,
|
||||
@@ -174,8 +174,10 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
|
||||
}
|
||||
},
|
||||
modifierList.getAnnotationEntries()
|
||||
);
|
||||
|
||||
);
|
||||
this.annotations = c.getAnnotationResolver().resolveAndAppendAnnotationsFromModifiers(
|
||||
classAnnotations, modifierList
|
||||
);
|
||||
}
|
||||
else {
|
||||
this.annotations = Annotations.EMPTY;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// FILE: a.kt
|
||||
|
||||
<!NOT_AN_ANNOTATION_CLASS!>annotation<!> class annotation
|
||||
annotation class annotation
|
||||
|
||||
// FILE: test/b.kt
|
||||
|
||||
@@ -22,4 +22,4 @@ annotation class My
|
||||
|
||||
kotlin.annotation.annotation class His
|
||||
|
||||
My class Our
|
||||
My class Our
|
||||
@@ -1,6 +1,6 @@
|
||||
package
|
||||
|
||||
annotation() public final class annotation {
|
||||
kotlin.annotation.annotation() public final class annotation : kotlin.Annotation {
|
||||
public constructor annotation()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package
|
||||
|
||||
kotlin.annotation.annotation() java.lang.Deprecated() public final class my : kotlin.Annotation {
|
||||
java.lang.Deprecated() kotlin.annotation.annotation() public final class my : kotlin.Annotation {
|
||||
public constructor my()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
// Class constructor parameter type CAN be recursively annotated
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class RecursivelyAnnotated(val x: @RecursivelyAnnotated(1) Int)
|
||||
annotation class RecursivelyAnnotated(val x: @RecursivelyAnnotated(1) Int)
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
annotation class B
|
||||
|
||||
class A {
|
||||
<!WRONG_ANNOTATION_TARGET!>annotation<!> companion object {}
|
||||
<!WRONG_MODIFIER_TARGET!>annotation<!> companion object {}
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>annotation<!> object O {}
|
||||
<!WRONG_MODIFIER_TARGET!>annotation<!> object O {}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>annotation<!> interface T {}
|
||||
<!WRONG_MODIFIER_TARGET!>annotation<!> interface T {}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>annotation<!> fun f() = 0
|
||||
<!WRONG_MODIFIER_TARGET!>annotation<!> fun f() = 0
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>annotation<!> val x = 0
|
||||
<!WRONG_MODIFIER_TARGET!>annotation<!> val x = 0
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>annotation<!> var y = 0
|
||||
<!WRONG_MODIFIER_TARGET!>annotation<!> var y = 0
|
||||
@@ -1,16 +0,0 @@
|
||||
// Annotations used for annotations :)
|
||||
enum class Target {
|
||||
CLASSIFIER,
|
||||
FUNCTION
|
||||
}
|
||||
|
||||
<!NOT_AN_ANNOTATION_CLASS!>target(Target.CLASSIFIER)<!>
|
||||
public <!NOT_AN_ANNOTATION_CLASS!>annotation<!> class target(vararg val allowedTargets: Target)
|
||||
|
||||
<!NOT_AN_ANNOTATION_CLASS!>target(Target.CLASSIFIER)<!>
|
||||
public <!NOT_AN_ANNOTATION_CLASS!>annotation(AnnotationRetention.SOURCE)<!> class annotation(
|
||||
val retention: AnnotationRetention = AnnotationRetention.RUNTIME,
|
||||
val repeatable: Boolean = false
|
||||
)
|
||||
|
||||
<!NOT_AN_ANNOTATION_CLASS!>annotation<!> class some
|
||||
@@ -1,44 +0,0 @@
|
||||
package
|
||||
|
||||
public final enum class Target : kotlin.Enum<Target> {
|
||||
enum entry CLASSIFIER
|
||||
|
||||
enum entry FUNCTION
|
||||
|
||||
private constructor Target()
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Target): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Target
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<Target>
|
||||
}
|
||||
|
||||
target(allowedTargets = {Target.CLASSIFIER}) annotation(retention = AnnotationRetention.SOURCE) public final class annotation {
|
||||
public constructor annotation(/*0*/ retention: kotlin.annotation.AnnotationRetention = ..., /*1*/ repeatable: kotlin.Boolean = ...)
|
||||
public final val repeatable: kotlin.Boolean
|
||||
public final val retention: kotlin.annotation.AnnotationRetention
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
annotation() public final class some {
|
||||
public constructor some()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
target(allowedTargets = {Target.CLASSIFIER}) annotation() public final class target {
|
||||
public constructor target(/*0*/ vararg allowedTargets: Target /*kotlin.Array<out Target>*/)
|
||||
public final val allowedTargets: kotlin.Array<out Target>
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
annotation() class emptyBrackets
|
||||
|
||||
emptyBrackets class base
|
||||
@@ -1,15 +0,0 @@
|
||||
package
|
||||
|
||||
emptyBrackets() public final class base {
|
||||
public constructor base()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation() public final class emptyBrackets : kotlin.Annotation {
|
||||
public constructor emptyBrackets()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+1
-1
@@ -13,4 +13,4 @@ class My(x: Int) {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> <!WRONG_ANNOTATION_TARGET!>@smartget<!> @smartset set
|
||||
|
||||
base <!WRONG_ANNOTATION_TARGET!>smartget<!> <!WRONG_ANNOTATION_TARGET!>smartset<!> fun foo() = y
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -17,4 +17,4 @@ base annotation class derived
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@ base enum class My <!WRONG_ANNOTATION_TARGET!>@base<!> constructor() {
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
|
||||
+1
-1
@@ -17,4 +17,4 @@
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>empty<!> val z = <!WRONG_ANNOTATION_TARGET!>@empty<!> 0
|
||||
<!WRONG_ANNOTATION_TARGET!>empty<!> val z = <!WRONG_ANNOTATION_TARGET!>@empty<!> 0
|
||||
|
||||
@@ -20,4 +20,4 @@ package test
|
||||
|
||||
package test
|
||||
|
||||
common class Correct
|
||||
common class Correct
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>incorrect<!> val z = <!WRONG_ANNOTATION_TARGET!>@incorrect<!> 0
|
||||
<!WRONG_ANNOTATION_TARGET!>incorrect<!> val z = <!WRONG_ANNOTATION_TARGET!>@incorrect<!> 0
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
|
||||
@@ -12,4 +12,4 @@ base class Outer {
|
||||
fun foo() {
|
||||
@base <!WRONG_ANNOTATION_TARGET!>@meta<!> class Local
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@
|
||||
return local
|
||||
}
|
||||
|
||||
base val z = 0
|
||||
base val z = 0
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@ annotation class typed
|
||||
base class My(val x: <!WRONG_ANNOTATION_TARGET!>@base<!> @typed Int, y: <!WRONG_ANNOTATION_TARGET!>@base<!> @typed Int) {
|
||||
val z: <!WRONG_ANNOTATION_TARGET!>@base<!> @typed Int = y
|
||||
fun foo(): <!WRONG_ANNOTATION_TARGET!>@base<!> @typed Int = z
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
annotation class base
|
||||
|
||||
val x: List<@<!DEBUG_INFO_MISSING_UNRESOLVED!>base<!> String>? = null
|
||||
val x: List<@<!DEBUG_INFO_MISSING_UNRESOLVED!>base<!> String>? = null
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
data <!WRONG_ANNOTATION_TARGET!>annotation<!> enum class E {
|
||||
data <!WRONG_MODIFIER_TARGET!>annotation<!> enum class E {
|
||||
D
|
||||
}
|
||||
@@ -97,7 +97,7 @@ abstract class IllegalModifiers6() {
|
||||
class IllegalModifiers7() {
|
||||
<!WRONG_MODIFIER_TARGET!>enum<!>
|
||||
<!WRONG_MODIFIER_TARGET!>inner<!>
|
||||
<!WRONG_ANNOTATION_TARGET!>annotation<!>
|
||||
<!WRONG_MODIFIER_TARGET!>annotation<!>
|
||||
<!WRONG_MODIFIER_TARGET!>out<!>
|
||||
<!INCOMPATIBLE_MODIFIERS!>in<!>
|
||||
<!WRONG_MODIFIER_TARGET!>vararg<!>
|
||||
@@ -105,7 +105,7 @@ class IllegalModifiers7() {
|
||||
val x = 1
|
||||
<!WRONG_MODIFIER_TARGET!>enum<!>
|
||||
<!WRONG_MODIFIER_TARGET!>inner<!>
|
||||
<!WRONG_ANNOTATION_TARGET!>annotation<!>
|
||||
<!WRONG_MODIFIER_TARGET!>annotation<!>
|
||||
<!WRONG_MODIFIER_TARGET!>out<!>
|
||||
<!INCOMPATIBLE_MODIFIERS!>in<!>
|
||||
<!WRONG_MODIFIER_TARGET!>vararg<!>
|
||||
@@ -119,7 +119,7 @@ class IllegalModifiers8 {
|
||||
<!WRONG_MODIFIER_TARGET!>enum<!>
|
||||
<!REDUNDANT_MODIFIER!>open<!>
|
||||
<!WRONG_MODIFIER_TARGET!>inner<!>
|
||||
<!WRONG_ANNOTATION_TARGET!>annotation<!>
|
||||
<!WRONG_MODIFIER_TARGET!>annotation<!>
|
||||
<!WRONG_MODIFIER_TARGET!>override<!>
|
||||
<!WRONG_MODIFIER_TARGET!>out<!>
|
||||
<!INCOMPATIBLE_MODIFIERS!>in<!>
|
||||
@@ -143,7 +143,7 @@ class IllegalModifiers10
|
||||
<!WRONG_MODIFIER_TARGET!>enum<!>
|
||||
<!REDUNDANT_MODIFIER!>open<!>
|
||||
<!WRONG_MODIFIER_TARGET!>inner<!>
|
||||
<!WRONG_ANNOTATION_TARGET!>annotation<!>
|
||||
<!WRONG_MODIFIER_TARGET!>annotation<!>
|
||||
<!WRONG_MODIFIER_TARGET!>override<!>
|
||||
<!WRONG_MODIFIER_TARGET!>out<!>
|
||||
<!INCOMPATIBLE_MODIFIERS!>in<!>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
class A {
|
||||
<!WRONG_ANNOTATION_TARGET!>external<!> constructor() {}
|
||||
<!WRONG_MODIFIER_TARGET!>external<!> constructor() {}
|
||||
inner class B {
|
||||
<!WRONG_ANNOTATION_TARGET!>external<!> constructor() {}
|
||||
<!WRONG_MODIFIER_TARGET!>external<!> constructor() {}
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>external<!> constructor(<!UNUSED_PARAMETER!>x<!>: Int)
|
||||
<!WRONG_MODIFIER_TARGET!>external<!> constructor(<!UNUSED_PARAMETER!>x<!>: Int)
|
||||
}
|
||||
|
||||
class C <!WRONG_ANNOTATION_TARGET!>external<!> constructor()
|
||||
class C <!WRONG_MODIFIER_TARGET!>external<!> constructor()
|
||||
+4
-5
@@ -18,14 +18,13 @@ JetFile: EnumEntryCommaInlineMember.kt
|
||||
OBJECT_DECLARATION_NAME
|
||||
PsiElement(IDENTIFIER)('FIRST')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
ENUM_ENTRY
|
||||
OBJECT_DECLARATION_NAME
|
||||
PsiElement(IDENTIFIER)('inline')
|
||||
PsiErrorElement:Expecting ';' after the last enum entry or '}' to close enum class body
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
PsiElement(inline)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
|
||||
@@ -21,12 +21,7 @@ JetFile: EnumEntrySemicolonInlineMember.kt
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('inline')
|
||||
PsiElement(inline)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
+1
-6
@@ -22,12 +22,7 @@ JetFile: EnumEntrySpaceInlineMember.kt
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('inline')
|
||||
PsiElement(inline)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
+3
-18
@@ -5,19 +5,9 @@ JetFile: EnumWithAnnotationKeyword.kt
|
||||
<empty list>
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
PsiElement(data)('data')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(enum)('enum')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -38,12 +28,7 @@ JetFile: EnumWithAnnotationKeyword.kt
|
||||
MODIFIER_LIST
|
||||
PsiElement(enum)('enum')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
+3
-13
@@ -23,12 +23,7 @@ JetFile: SimpleModifiers.kt
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(open)('open')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(override)('override')
|
||||
PsiWhiteSpace('\n')
|
||||
@@ -70,12 +65,7 @@ JetFile: SimpleModifiers.kt
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(open)('open')
|
||||
PsiWhiteSpace('\n ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(override)('override')
|
||||
PsiWhiteSpace('\n ')
|
||||
@@ -173,4 +163,4 @@ JetFile: SimpleModifiers.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('lazy')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(RBRACE)('}')
|
||||
+4
-24
@@ -36,12 +36,7 @@ JetFile: SoftKeywords.kt
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(open)('open')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(override)('override')
|
||||
PsiWhiteSpace('\n')
|
||||
@@ -116,12 +111,7 @@ JetFile: SoftKeywords.kt
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(open)('open')
|
||||
PsiWhiteSpace('\n ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(override)('override')
|
||||
PsiWhiteSpace('\n ')
|
||||
@@ -1172,12 +1162,7 @@ JetFile: SoftKeywords.kt
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(open)('open')
|
||||
PsiWhiteSpace('\n ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(override)('override')
|
||||
PsiWhiteSpace('\n ')
|
||||
@@ -1563,12 +1548,7 @@ JetFile: SoftKeywords.kt
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(open)('open')
|
||||
PsiWhiteSpace('\n ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(override)('override')
|
||||
PsiWhiteSpace('\n ')
|
||||
|
||||
+3
-13
@@ -25,12 +25,7 @@ JetFile: Annotations.kt
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(open)('open')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(override)('override')
|
||||
PsiWhiteSpace('\n')
|
||||
@@ -271,12 +266,7 @@ JetFile: Annotations.kt
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(open)('open')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(override)('override')
|
||||
PsiWhiteSpace('\n')
|
||||
@@ -346,4 +336,4 @@ JetFile: Annotations.kt
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(RBRACE)('}')
|
||||
+3
-13
@@ -25,12 +25,7 @@ JetFile: Annotations_ERR.kt
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(open)('open')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(override)('override')
|
||||
PsiWhiteSpace('\n')
|
||||
@@ -226,12 +221,7 @@ JetFile: Annotations_ERR.kt
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(open)('open')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(override)('override')
|
||||
PsiWhiteSpace('\n')
|
||||
@@ -301,4 +291,4 @@ JetFile: Annotations_ERR.kt
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(RBRACE)('}')
|
||||
+2
-7
@@ -109,12 +109,7 @@ JetFile: forParameters.kt
|
||||
MODIFIER_LIST
|
||||
PsiElement(private)('private')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
PsiElement(data)('data')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
@@ -525,4 +520,4 @@ JetFile: forParameters.kt
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,60 @@
|
||||
data annotation tailrec external noinline fun bar(data x: Int) {
|
||||
data inline noinline class A
|
||||
|
||||
inline fun foo() {}
|
||||
|
||||
noinline val x1 = 1
|
||||
|
||||
data();
|
||||
|
||||
val x2 = 2
|
||||
|
||||
data;
|
||||
|
||||
val x3 = 3
|
||||
|
||||
inline
|
||||
|
||||
|
||||
private
|
||||
val x4 = 4
|
||||
|
||||
abstract
|
||||
|
||||
data
|
||||
|
||||
class Q
|
||||
}
|
||||
|
||||
|
||||
fun foo1() {
|
||||
data()
|
||||
|
||||
inline data annotation // infix call
|
||||
}
|
||||
|
||||
fun foo2() {
|
||||
data {
|
||||
|
||||
}
|
||||
|
||||
inline(data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public data inline class A {
|
||||
val x: Int
|
||||
inline data set
|
||||
noinline get
|
||||
|
||||
val y: String
|
||||
inline get() = 1
|
||||
data set(q: Int) = 2
|
||||
|
||||
val z: Double inline get noinline set
|
||||
|
||||
val z0: Double = 3.0
|
||||
inline get noinline set
|
||||
}
|
||||
@@ -0,0 +1,352 @@
|
||||
JetFile: newModifiers.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
PsiElement(data)('data')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(tailrec)('tailrec')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(external)('external')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(noinline)('noinline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_PARAMETER
|
||||
MODIFIER_LIST
|
||||
PsiElement(data)('data')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
PsiElement(data)('data')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(inline)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(noinline)('noinline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
PsiElement(inline)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PROPERTY
|
||||
MODIFIER_LIST
|
||||
PsiElement(noinline)('noinline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('x1')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('x2')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('2')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('x3')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('3')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PROPERTY
|
||||
MODIFIER_LIST
|
||||
PsiElement(inline)('inline')
|
||||
PsiWhiteSpace('\n\n\n ')
|
||||
PsiElement(private)('private')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('x4')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('4')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
PsiElement(abstract)('abstract')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PsiElement(data)('data')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('Q')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n\n')
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiComment(EOL_COMMENT)('// infix call')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n')
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo2')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
BLOCK
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('inline')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
BLOCK
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n\n')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
PsiElement(public)('public')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(data)('data')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(inline)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiWhiteSpace(' ')
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiWhiteSpace('\n ')
|
||||
PROPERTY_ACCESSOR
|
||||
MODIFIER_LIST
|
||||
PsiElement(inline)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(data)('data')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(set)('set')
|
||||
PsiWhiteSpace('\n ')
|
||||
PROPERTY_ACCESSOR
|
||||
MODIFIER_LIST
|
||||
PsiElement(noinline)('noinline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(get)('get')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('y')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('String')
|
||||
PsiWhiteSpace('\n ')
|
||||
PROPERTY_ACCESSOR
|
||||
MODIFIER_LIST
|
||||
PsiElement(inline)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(get)('get')
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace('\n ')
|
||||
PROPERTY_ACCESSOR
|
||||
MODIFIER_LIST
|
||||
PsiElement(data)('data')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(set)('set')
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_PARAMETER_LIST
|
||||
VALUE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('q')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('2')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('z')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Double')
|
||||
PsiWhiteSpace(' ')
|
||||
PROPERTY_ACCESSOR
|
||||
MODIFIER_LIST
|
||||
PsiElement(inline)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(get)('get')
|
||||
PsiWhiteSpace(' ')
|
||||
PROPERTY_ACCESSOR
|
||||
MODIFIER_LIST
|
||||
PsiElement(noinline)('noinline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(set)('set')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('z0')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Double')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
FLOAT_CONSTANT
|
||||
PsiElement(FLOAT_CONSTANT)('3.0')
|
||||
PsiWhiteSpace('\n ')
|
||||
PROPERTY_ACCESSOR
|
||||
MODIFIER_LIST
|
||||
PsiElement(inline)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(get)('get')
|
||||
PsiWhiteSpace(' ')
|
||||
PROPERTY_ACCESSOR
|
||||
MODIFIER_LIST
|
||||
PsiElement(noinline)('noinline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(set)('set')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,9 @@
|
||||
@inline @tailrec class A {
|
||||
@inline(1) fun foo() {
|
||||
|
||||
}
|
||||
|
||||
kotlin.inline fun bar() {
|
||||
@kotlin.data() class Local
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
JetFile: oldUsages.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('tailrec')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiWhiteSpace(' ')
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('inline')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('kotlin')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('kotlin')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('Local')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
+2
-7
@@ -26,12 +26,7 @@ JetFile: multiDeclaration.kt
|
||||
MODIFIER_LIST
|
||||
PsiElement(private)('private')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
PsiElement(data)('data')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
@@ -160,4 +155,4 @@ JetFile: multiDeclaration.kt
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(RBRACE)('}')
|
||||
+7
-12
@@ -6,18 +6,13 @@ JetFile: oldAnnotationsRecovery.kt
|
||||
PsiErrorElement:Expecting a top level declaration
|
||||
PsiElement(LBRACKET)('[')
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(data)('data')
|
||||
PsiErrorElement:Expecting a top level declaration
|
||||
PsiElement(LPAR)('(')
|
||||
PsiErrorElement:Expecting a top level declaration
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiErrorElement:Expecting a top level declaration
|
||||
PsiElement(RPAR)(')')
|
||||
PsiErrorElement:Expecting a top level declaration
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
class Annotation {
|
||||
fun setProblemGroup() {}
|
||||
fun getQuickFixes() = 0
|
||||
}
|
||||
|
||||
fun registerQuickFix(annot: Annotation) {
|
||||
annot.setProblemGroup()
|
||||
val fixes = annot.getQuickFixes()
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
JetFile: annotAsArgComplex.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
CLASS
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('Annotation')
|
||||
PsiWhiteSpace(' ')
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('setProblemGroup')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('getQuickFixes')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('0')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n')
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('registerQuickFix')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('annot')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Annotation')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annot')
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('setProblemGroup')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('fixes')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annot')
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('getQuickFixes')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -1,20 +0,0 @@
|
||||
// Annotations used for annotations :)
|
||||
enum class Target {
|
||||
CLASSIFIER,
|
||||
FUNCTION
|
||||
}
|
||||
|
||||
enum class Retention {
|
||||
SOURCE,
|
||||
BINARY,
|
||||
RUNTIME
|
||||
}
|
||||
|
||||
target(Target.CLASSIFIER)
|
||||
public annotation class target(vararg val allowedTargets: Target)
|
||||
|
||||
target(Target.CLASSIFIER)
|
||||
public annotation(Retention.SOURCE) class annotation(
|
||||
val retention: Retention = Retention.RUNTIME,
|
||||
val repeatable: Boolean = false
|
||||
)
|
||||
@@ -1,188 +0,0 @@
|
||||
JetFile: annotation.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
CLASS
|
||||
PsiComment(EOL_COMMENT)('// Annotations used for annotations :)')
|
||||
PsiWhiteSpace('\n')
|
||||
MODIFIER_LIST
|
||||
PsiElement(enum)('enum')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('Target')
|
||||
PsiWhiteSpace(' ')
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
ENUM_ENTRY
|
||||
OBJECT_DECLARATION_NAME
|
||||
PsiElement(IDENTIFIER)('CLASSIFIER')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
ENUM_ENTRY
|
||||
OBJECT_DECLARATION_NAME
|
||||
PsiElement(IDENTIFIER)('FUNCTION')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
PsiElement(enum)('enum')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('Retention')
|
||||
PsiWhiteSpace(' ')
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
ENUM_ENTRY
|
||||
OBJECT_DECLARATION_NAME
|
||||
PsiElement(IDENTIFIER)('SOURCE')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
ENUM_ENTRY
|
||||
OBJECT_DECLARATION_NAME
|
||||
PsiElement(IDENTIFIER)('BINARY')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
ENUM_ENTRY
|
||||
OBJECT_DECLARATION_NAME
|
||||
PsiElement(IDENTIFIER)('RUNTIME')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('target')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Target')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('CLASSIFIER')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' \n')
|
||||
PsiElement(public)('public')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('target')
|
||||
PRIMARY_CONSTRUCTOR
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_PARAMETER
|
||||
MODIFIER_LIST
|
||||
PsiElement(vararg)('vararg')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('allowedTargets')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Target')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('target')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Target')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('CLASSIFIER')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(public)('public')
|
||||
PsiWhiteSpace(' ')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Retention')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('SOURCE')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PRIMARY_CONSTRUCTOR
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiWhiteSpace('\n ')
|
||||
VALUE_PARAMETER
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('retention')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Retention')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Retention')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('RUNTIME')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
VALUE_PARAMETER
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('repeatable')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Boolean')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
BOOLEAN_CONSTANT
|
||||
PsiElement(false)('false')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RPAR)(')')
|
||||
+2
-12
@@ -20,12 +20,7 @@ JetFile: java.kt
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace(' \n')
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
@@ -63,12 +58,7 @@ JetFile: java.kt
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace(' \n')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
annotation class base
|
||||
|
||||
annotation() class empty
|
||||
|
||||
annotation(repeatable = true) class ann
|
||||
|
||||
annotation(Retention.BINARY, false) class ann2
|
||||
|
||||
annotation(retention = Retention.RUNTIME) class ann3
|
||||
|
||||
@Target(Target.FUNCTION, Target.CLASSIFIER, Target.EXPRESSION)
|
||||
annotation(Retention.SOURCE) class ann4
|
||||
@@ -1,174 +0,0 @@
|
||||
JetFile: options.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('base')
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('empty')
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
VALUE_ARGUMENT_NAME
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('repeatable')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
BOOLEAN_CONSTANT
|
||||
PsiElement(true)('true')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('ann')
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Retention')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('BINARY')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_ARGUMENT
|
||||
BOOLEAN_CONSTANT
|
||||
PsiElement(false)('false')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('ann2')
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
VALUE_ARGUMENT_NAME
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('retention')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Retention')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('RUNTIME')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('ann3')
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Target')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Target')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('FUNCTION')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_ARGUMENT
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Target')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('CLASSIFIER')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_ARGUMENT
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Target')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('EXPRESSION')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Retention')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('SOURCE')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('ann4')
|
||||
Vendored
+2
-7
@@ -35,13 +35,8 @@ JetFile: withoutFileAnnotationAndPackageDeclaration.kt
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('annotation')
|
||||
PsiElement(annotation)('annotation')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('ann')
|
||||
PsiElement(IDENTIFIER)('ann')
|
||||
+2
-7
@@ -5,12 +5,7 @@ JetFile: With.kt
|
||||
<empty list>
|
||||
FUN
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('inline')
|
||||
PsiElement(inline)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -187,4 +182,4 @@ JetFile: With.kt
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -1004,12 +1004,6 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/options"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("annotation.kt")
|
||||
public void testAnnotation() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/annotation.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("annotationAsArg.kt")
|
||||
public void testAnnotationAsArg() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/annotationAsArg.kt");
|
||||
@@ -1022,12 +1016,6 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("brackets.kt")
|
||||
public void testBrackets() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/brackets.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("documented.kt")
|
||||
public void testDocumented() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/documented.kt");
|
||||
|
||||
@@ -891,6 +891,27 @@ public class JetParsingTestGenerated extends AbstractJetParsingTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/psi/annotation/modifiersMigration")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ModifiersMigration extends AbstractJetParsingTest {
|
||||
public void testAllFilesPresentInModifiersMigration() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/annotation/modifiersMigration"), Pattern.compile("^(.*)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("newModifiers.kt")
|
||||
public void testNewModifiers() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/modifiersMigration/newModifiers.kt");
|
||||
doParsingTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("oldUsages.kt")
|
||||
public void testOldUsages() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/modifiersMigration/oldUsages.kt");
|
||||
doParsingTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/psi/annotation/options")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@@ -899,18 +920,6 @@ public class JetParsingTestGenerated extends AbstractJetParsingTest {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/annotation/options"), Pattern.compile("^(.*)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("annotAsArgComplex.kt")
|
||||
public void testAnnotAsArgComplex() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/annotAsArgComplex.kt");
|
||||
doParsingTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("annotation.kt")
|
||||
public void testAnnotation() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/annotation.kt");
|
||||
doParsingTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("annotationAsArg.kt")
|
||||
public void testAnnotationAsArg() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/annotationAsArg.kt");
|
||||
@@ -934,12 +943,6 @@ public class JetParsingTestGenerated extends AbstractJetParsingTest {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/local.kt");
|
||||
doParsingTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("options.kt")
|
||||
public void testOptions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/options.kt");
|
||||
doParsingTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/psi/annotation/targeted")
|
||||
|
||||
@@ -247,7 +247,7 @@ public class KotlinBuiltIns {
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@NotNull
|
||||
private ClassDescriptor getAnnotationClassByName(@NotNull Name simpleName) {
|
||||
public ClassDescriptor getAnnotationClassByName(@NotNull Name simpleName) {
|
||||
ClassifierDescriptor classifier = annotationPackageFragment.getMemberScope().getClassifier(simpleName,
|
||||
NoLookupLocation.FROM_BUILTINS);
|
||||
assert classifier instanceof ClassDescriptor : "Must be a class descriptor " + simpleName + ", but was " +
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.descriptors.annotations
|
||||
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
|
||||
// Please synchronize this set with JetTokens.ANNOTATION_MODIFIERS_KEYWORDS_ARRAY
|
||||
public val ANNOTATION_MODIFIERS_FQ_NAMES: Set<FqName> =
|
||||
arrayOf("data", "inline", "noinline", "tailrec", "external", "annotation.annotation").map { FqName("kotlin.$it") }.toSet()
|
||||
@@ -18,6 +18,7 @@ package org.jetbrains.kotlin.renderer
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.annotations.ANNOTATION_MODIFIERS_FQ_NAMES
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotated
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget
|
||||
@@ -30,6 +31,7 @@ import org.jetbrains.kotlin.resolve.constants.AnnotationValue
|
||||
import org.jetbrains.kotlin.resolve.constants.ArrayValue
|
||||
import org.jetbrains.kotlin.resolve.constants.ConstantValue
|
||||
import org.jetbrains.kotlin.resolve.constants.KClassValue
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.hasDefaultValue
|
||||
import org.jetbrains.kotlin.types.*
|
||||
import org.jetbrains.kotlin.types.ErrorUtils.UninferredParameterTypeConstructor
|
||||
@@ -342,7 +344,12 @@ internal class DescriptorRendererImpl(
|
||||
var hasTargetedAnnotations = false
|
||||
|
||||
val annotationsBuilder = StringBuilder {
|
||||
for ((annotation, target) in annotated.getAnnotations().getAllAnnotations()) {
|
||||
// Sort is needed just to fix some order when annotations resolved from modifiers
|
||||
// See AnnotationResolver.resolveAndAppendAnnotationsFromModifiers for clarification
|
||||
// This hack can be removed when modifiers will be resolved without annotations
|
||||
|
||||
val sortedAnnotations = annotated.getAnnotations().getAllAnnotations().sortedBy { p -> p.annotation.isBuiltinModifier() }
|
||||
for ((annotation, target) in sortedAnnotations) {
|
||||
val annotationClass = annotation.getType().getConstructor().getDeclarationDescriptor() as ClassDescriptor
|
||||
|
||||
if (!excluded.contains(DescriptorUtils.getFqNameSafe(annotationClass))) {
|
||||
@@ -367,6 +374,9 @@ internal class DescriptorRendererImpl(
|
||||
}
|
||||
}
|
||||
|
||||
private fun AnnotationDescriptor.isBuiltinModifier()
|
||||
= (type.constructor.declarationDescriptor as ClassDescriptor).fqNameSafe in ANNOTATION_MODIFIERS_FQ_NAMES
|
||||
|
||||
override fun renderAnnotation(annotation: AnnotationDescriptor, target: AnnotationUseSiteTarget?): String {
|
||||
return StringBuilder {
|
||||
if (target != null) {
|
||||
|
||||
@@ -36,4 +36,10 @@ class MouseMovedEventArgs
|
||||
// EXIST: companion object
|
||||
// EXIST: sealed
|
||||
// EXIST: lateinit
|
||||
// EXIST: data
|
||||
// EXIST: inline
|
||||
// EXIST: noinline
|
||||
// EXIST: tailrec
|
||||
// EXIST: external
|
||||
// EXIST: annotation
|
||||
// NOTHING_ELSE
|
||||
|
||||
@@ -39,5 +39,11 @@ class B {
|
||||
// EXIST: companion object
|
||||
// EXIST: sealed
|
||||
// EXIST: lateinit
|
||||
// EXIST: data
|
||||
// EXIST: inline
|
||||
// EXIST: noinline
|
||||
// EXIST: tailrec
|
||||
// EXIST: external
|
||||
// EXIST: annotation
|
||||
/*TODO*/
|
||||
// NOTHING_ELSE
|
||||
|
||||
@@ -39,4 +39,10 @@ class A {
|
||||
// EXIST: companion object
|
||||
// EXIST: sealed
|
||||
// EXIST: lateinit
|
||||
// EXIST: data
|
||||
// EXIST: inline
|
||||
// EXIST: noinline
|
||||
// EXIST: tailrec
|
||||
// EXIST: external
|
||||
// EXIST: annotation
|
||||
// NOTHING_ELSE
|
||||
|
||||
@@ -39,5 +39,11 @@ var a : Int
|
||||
// EXIST: companion object
|
||||
// EXIST: sealed
|
||||
// EXIST: lateinit
|
||||
// EXIST: data
|
||||
// EXIST: inline
|
||||
// EXIST: noinline
|
||||
// EXIST: tailrec
|
||||
// EXIST: external
|
||||
// EXIST: annotation
|
||||
/*TODO*/
|
||||
// NOTHING_ELSE
|
||||
|
||||
@@ -37,4 +37,10 @@ public class Test {
|
||||
// EXIST: companion object
|
||||
// EXIST: sealed
|
||||
// EXIST: lateinit
|
||||
// EXIST: data
|
||||
// EXIST: inline
|
||||
// EXIST: noinline
|
||||
// EXIST: tailrec
|
||||
// EXIST: external
|
||||
// EXIST: annotation
|
||||
// NOTHING_ELSE
|
||||
|
||||
@@ -31,4 +31,10 @@ class TestClass {
|
||||
// EXIST: companion object
|
||||
// EXIST: sealed
|
||||
// EXIST: lateinit
|
||||
// EXIST: data
|
||||
// EXIST: inline
|
||||
// EXIST: noinline
|
||||
// EXIST: tailrec
|
||||
// EXIST: external
|
||||
// EXIST: annotation
|
||||
// NOTHING_ELSE
|
||||
|
||||
@@ -30,5 +30,11 @@ package Test
|
||||
// EXIST: companion object
|
||||
// EXIST: sealed
|
||||
// EXIST: lateinit
|
||||
// EXIST: data
|
||||
// EXIST: inline
|
||||
// EXIST: noinline
|
||||
// EXIST: tailrec
|
||||
// EXIST: external
|
||||
// EXIST: annotation
|
||||
/*TODO*/
|
||||
// NOTHING_ELSE
|
||||
|
||||
@@ -35,4 +35,10 @@ class Some {
|
||||
// EXIST: companion object
|
||||
// EXIST: sealed
|
||||
// EXIST: lateinit
|
||||
// EXIST: data
|
||||
// EXIST: inline
|
||||
// EXIST: noinline
|
||||
// EXIST: tailrec
|
||||
// EXIST: external
|
||||
// EXIST: annotation
|
||||
// NOTHING_ELSE
|
||||
|
||||
@@ -35,4 +35,10 @@ class Some {
|
||||
// EXIST: companion object
|
||||
// EXIST: sealed
|
||||
// EXIST: lateinit
|
||||
// EXIST: data
|
||||
// EXIST: inline
|
||||
// EXIST: noinline
|
||||
// EXIST: tailrec
|
||||
// EXIST: external
|
||||
// EXIST: annotation
|
||||
// NOTHING_ELSE
|
||||
|
||||
@@ -37,4 +37,10 @@ class Some {
|
||||
// EXIST: companion object
|
||||
// EXIST: sealed
|
||||
// EXIST: lateinit
|
||||
// EXIST: data
|
||||
// EXIST: inline
|
||||
// EXIST: noinline
|
||||
// EXIST: tailrec
|
||||
// EXIST: external
|
||||
// EXIST: annotation
|
||||
// NOTHING_ELSE
|
||||
|
||||
@@ -29,5 +29,11 @@
|
||||
// EXIST: companion object
|
||||
// EXIST: sealed
|
||||
// EXIST: lateinit
|
||||
// EXIST: data
|
||||
// EXIST: inline
|
||||
// EXIST: noinline
|
||||
// EXIST: tailrec
|
||||
// EXIST: external
|
||||
// EXIST: annotation
|
||||
/*TODO*/
|
||||
// NOTHING_ELSE
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
interface T
|
||||
class T1(<warning>t</warning>: Int): T
|
||||
|
||||
inline fun <T> run(f: () -> T) = f()
|
||||
<info descr="null">inline</info> fun <T> run(f: () -> T) = f()
|
||||
|
||||
|
||||
class Delegate(<warning>d</warning>: Int) {
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
inline fun <T> run(f: () -> T) = f()
|
||||
<info descr="null">inline</info> fun <T> run(f: () -> T) = f()
|
||||
fun run2(f: () -> Unit) = f()
|
||||
|
||||
fun inline() {
|
||||
@@ -90,7 +90,7 @@ fun objectExpression() {
|
||||
}
|
||||
}
|
||||
|
||||
inline fun withNoInlineParam(noinline task1: () -> Unit, task2: () -> Unit) {
|
||||
<info>inline</info> fun withNoInlineParam(<info>noinline</info> task1: () -> Unit, task2: () -> Unit) {
|
||||
task1()
|
||||
task2()
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
package test
|
||||
|
||||
kotlin.data dependency.A dependency.B dependency.C public final class Annotations public constructor() {
|
||||
kotlin.inline dependency.A dependency.B dependency.C public final val p: @[dependency.B] kotlin.Int /* compiled code */
|
||||
dependency.A dependency.B dependency.C kotlin.data public final class Annotations public constructor() {
|
||||
dependency.A dependency.B dependency.C kotlin.inline public final val p: @[dependency.B] kotlin.Int /* compiled code */
|
||||
|
||||
kotlin.inline dependency.A dependency.B dependency.C public final fun f(dependency.A dependency.B dependency.C kotlin.Deprecated i: @[dependency.A] kotlin.Int): kotlin.Unit { /* compiled code */ }
|
||||
dependency.A dependency.B dependency.C kotlin.inline public final fun f(dependency.A dependency.B dependency.C kotlin.Deprecated i: @[dependency.A] kotlin.Int): kotlin.Unit { /* compiled code */ }
|
||||
}
|
||||
+2
-2
@@ -4,8 +4,8 @@ interface <info textAttributesKey="KOTLIN_TRAIT">TheTrait</info> {
|
||||
class <info textAttributesKey="KOTLIN_CLASS">TheClass</info> : <info textAttributesKey="KOTLIN_TRAIT">TheTrait</info> {
|
||||
}
|
||||
|
||||
<info textAttributesKey="KOTLIN_ANNOTATION">annotation</info> class <info textAttributesKey="KOTLIN_ANNOTATION">magnificent</info>
|
||||
<info textAttributesKey="KOTLIN_ANNOTATION">annotation</info> class <info textAttributesKey="KOTLIN_ANNOTATION">Deprecated</info>
|
||||
<info textAttributesKey="KOTLIN_BUILTIN_ANNOTATION">annotation</info> class <info textAttributesKey="KOTLIN_ANNOTATION">magnificent</info>
|
||||
<info textAttributesKey="KOTLIN_BUILTIN_ANNOTATION">annotation</info> class <info textAttributesKey="KOTLIN_ANNOTATION">Deprecated</info>
|
||||
|
||||
<info textAttributesKey="KOTLIN_ANNOTATION">@Deprecated</info>
|
||||
<info textAttributesKey="KOTLIN_ANNOTATION">magnificent</info> <info textAttributesKey="KOTLIN_BUILTIN_ANNOTATION">abstract</info> class <info textAttributesKey="KOTLIN_ABSTRACT_CLASS">AbstractClass</info><<info textAttributesKey="KOTLIN_TYPE_PARAMETER">T</info>> {
|
||||
|
||||
+1
-6
@@ -2,9 +2,4 @@ PsiJetFileStubImpl[package=]
|
||||
PACKAGE_DIRECTIVE:
|
||||
IMPORT_LIST:
|
||||
CLASS:[fqName=Test, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=Test, superNames=[]]
|
||||
MODIFIER_LIST:[]
|
||||
ANNOTATION_ENTRY:[hasValueArguments=false, shortName=annotation]
|
||||
CONSTRUCTOR_CALLEE:
|
||||
TYPE_REFERENCE:
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
REFERENCE_EXPRESSION:[referencedName=annotation]
|
||||
MODIFIER_LIST:[annotation]
|
||||
|
||||
+1
-6
@@ -77,9 +77,4 @@ PsiJetFileStubImpl[package=test]
|
||||
MODIFIER_LIST:[internal]
|
||||
VALUE_PARAMETER_LIST:
|
||||
CLASS:[fqName=test.anno, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=anno, superNames=[]]
|
||||
MODIFIER_LIST:[]
|
||||
ANNOTATION_ENTRY:[hasValueArguments=false, shortName=annotation]
|
||||
CONSTRUCTOR_CALLEE:
|
||||
TYPE_REFERENCE:
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
REFERENCE_EXPRESSION:[referencedName=annotation]
|
||||
MODIFIER_LIST:[annotation]
|
||||
|
||||
+2
-12
@@ -2,19 +2,9 @@ PsiJetFileStubImpl[package=]
|
||||
PACKAGE_DIRECTIVE:
|
||||
IMPORT_LIST:
|
||||
CLASS:[fqName=a, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=a, superNames=[]]
|
||||
MODIFIER_LIST:[]
|
||||
ANNOTATION_ENTRY:[hasValueArguments=false, shortName=annotation]
|
||||
CONSTRUCTOR_CALLEE:
|
||||
TYPE_REFERENCE:
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
REFERENCE_EXPRESSION:[referencedName=annotation]
|
||||
MODIFIER_LIST:[annotation]
|
||||
CLASS:[fqName=b, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=b, superNames=[]]
|
||||
MODIFIER_LIST:[]
|
||||
ANNOTATION_ENTRY:[hasValueArguments=false, shortName=annotation]
|
||||
CONSTRUCTOR_CALLEE:
|
||||
TYPE_REFERENCE:
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
REFERENCE_EXPRESSION:[referencedName=annotation]
|
||||
MODIFIER_LIST:[annotation]
|
||||
PRIMARY_CONSTRUCTOR:
|
||||
VALUE_PARAMETER_LIST:
|
||||
VALUE_PARAMETER:[fqName=b.e, hasDefaultValue=false, hasValOrVar=true, isMutable=false, name=e]
|
||||
|
||||
Reference in New Issue
Block a user