diff --git a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/Errors.java b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/Errors.java index 0237d6a49e0..dd94bff29ed 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/Errors.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/Errors.java @@ -124,8 +124,6 @@ public interface Errors { DiagnosticFactory0 ANNOTATION_CLASS_WITH_BODY = DiagnosticFactory0.create(ERROR); DiagnosticFactory0 INVALID_TYPE_OF_ANNOTATION_MEMBER = DiagnosticFactory0.create(ERROR); DiagnosticFactory0 NULLABLE_TYPE_OF_ANNOTATION_MEMBER = DiagnosticFactory0.create(ERROR); - DiagnosticFactory0 ILLEGAL_ANNOTATION_KEYWORD = - DiagnosticFactory0.create(ERROR, modifierSetPosition(JetTokens.ANNOTATION_KEYWORD)); DiagnosticFactory0 ANNOTATION_PARAMETER_MUST_BE_CONST = DiagnosticFactory0.create(ERROR); DiagnosticFactory0 ANNOTATION_PARAMETER_MUST_BE_KCLASS_LITERAL = DiagnosticFactory0.create(ERROR); DiagnosticFactory0 ANNOTATION_PARAMETER_MUST_BE_ENUM_CONST = DiagnosticFactory0.create(ERROR); diff --git a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java index 076ff54bf19..41ec53aaf5e 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java @@ -613,7 +613,6 @@ public class DefaultErrorMessages { MAP.put(ANNOTATION_CLASS_WITH_BODY, "Body is not allowed for annotation class"); MAP.put(INVALID_TYPE_OF_ANNOTATION_MEMBER, "Invalid type of annotation member"); MAP.put(NULLABLE_TYPE_OF_ANNOTATION_MEMBER, "An annotation parameter cannot be nullable"); - MAP.put(ILLEGAL_ANNOTATION_KEYWORD, "''annotation'' keyword is only applicable for class"); MAP.put(ANNOTATION_PARAMETER_MUST_BE_CONST, "An annotation parameter must be a compile-time constant"); MAP.put(ANNOTATION_PARAMETER_MUST_BE_ENUM_CONST, "An enum annotation parameter must be a enum constant"); MAP.put(ANNOTATION_PARAMETER_MUST_BE_KCLASS_LITERAL, "An annotation parameter must be a class literal (T::class)"); diff --git a/compiler/frontend/src/org/jetbrains/kotlin/lexer/JetTokens.java b/compiler/frontend/src/org/jetbrains/kotlin/lexer/JetTokens.java index 30d77adfab9..f3e44c2f7d1 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/lexer/JetTokens.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/lexer/JetTokens.java @@ -145,7 +145,6 @@ public interface JetTokens { JetModifierKeywordToken ENUM_KEYWORD = JetModifierKeywordToken.softKeywordModifier("enum"); JetModifierKeywordToken OPEN_KEYWORD = JetModifierKeywordToken.softKeywordModifier("open"); JetModifierKeywordToken INNER_KEYWORD = JetModifierKeywordToken.softKeywordModifier("inner"); - JetModifierKeywordToken ANNOTATION_KEYWORD = JetModifierKeywordToken.softKeywordModifier("annotation"); JetModifierKeywordToken OVERRIDE_KEYWORD = JetModifierKeywordToken.softKeywordModifier("override"); JetModifierKeywordToken PRIVATE_KEYWORD = JetModifierKeywordToken.softKeywordModifier("private"); JetModifierKeywordToken PUBLIC_KEYWORD = JetModifierKeywordToken.softKeywordModifier("public"); @@ -172,7 +171,7 @@ public interface JetTokens { ); TokenSet SOFT_KEYWORDS = TokenSet.create(FILE_KEYWORD, IMPORT_KEYWORD, WHERE_KEYWORD, BY_KEYWORD, GET_KEYWORD, - SET_KEYWORD, ABSTRACT_KEYWORD, ENUM_KEYWORD, OPEN_KEYWORD, INNER_KEYWORD, ANNOTATION_KEYWORD, + SET_KEYWORD, ABSTRACT_KEYWORD, ENUM_KEYWORD, OPEN_KEYWORD, INNER_KEYWORD, OVERRIDE_KEYWORD, PRIVATE_KEYWORD, PUBLIC_KEYWORD, INTERNAL_KEYWORD, PROTECTED_KEYWORD, CATCH_KEYWORD, FINALLY_KEYWORD, OUT_KEYWORD, FINAL_KEYWORD, VARARG_KEYWORD, REIFIED_KEYWORD, DYNAMIC_KEYWORD, COMPANION_KEYWORD, CONSTRUCTOR_KEYWORD, INIT_KEYWORD, SEALED_KEYWORD @@ -185,7 +184,7 @@ public interface JetTokens { */ JetModifierKeywordToken[] MODIFIER_KEYWORDS_ARRAY = new JetModifierKeywordToken[] { - ABSTRACT_KEYWORD, ENUM_KEYWORD, OPEN_KEYWORD, INNER_KEYWORD, ANNOTATION_KEYWORD, OVERRIDE_KEYWORD, PRIVATE_KEYWORD, + 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 }; diff --git a/compiler/frontend/src/org/jetbrains/kotlin/psi/JetClassOrObject.kt b/compiler/frontend/src/org/jetbrains/kotlin/psi/JetClassOrObject.kt index b58e39d1c60..7b3482cd6f9 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/psi/JetClassOrObject.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/psi/JetClassOrObject.kt @@ -25,6 +25,7 @@ import com.intellij.psi.impl.CheckUtil import com.intellij.psi.impl.source.codeStyle.CodeEditUtil import com.intellij.psi.stubs.IStubElementType import org.jetbrains.kotlin.JetNodeTypes +import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.lexer.JetTokens import org.jetbrains.kotlin.psi.stubs.KotlinClassOrObjectStub import org.jetbrains.kotlin.psi.stubs.elements.JetStubElementTypes @@ -64,7 +65,16 @@ abstract public class JetClassOrObject : JetTypeParameterListOwnerStub = getBody()?.getSecondaryConstructors().orEmpty() - public fun isAnnotation(): Boolean = hasModifier(JetTokens.ANNOTATION_KEYWORD) + public fun isAnnotation(): Boolean = hasAnnotation(KotlinBuiltIns.FQ_NAMES.annotation.shortName().asString()) + + private fun hasAnnotation(name: String): Boolean { + for (entry in getAnnotationEntries()) { + val typeReference = entry.getTypeReference() + val userType = typeReference?.getStubOrPsiChild(JetStubElementTypes.USER_TYPE) ?: continue + if (name == userType.getReferencedName()) return true + } + return false + } public override fun delete() { CheckUtil.checkWritable(this); diff --git a/compiler/frontend/src/org/jetbrains/kotlin/psi/addRemoveModifier.kt b/compiler/frontend/src/org/jetbrains/kotlin/psi/addRemoveModifier.kt index 74519420943..67ee4302bc7 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/psi/addRemoveModifier.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/psi/addRemoveModifier.kt @@ -102,4 +102,4 @@ private val MODIFIERS_ORDER = listOf(PUBLIC_KEYWORD, PROTECTED_KEYWORD, PRIVATE_ FINAL_KEYWORD, OPEN_KEYWORD, ABSTRACT_KEYWORD, OVERRIDE_KEYWORD, INNER_KEYWORD, - ANNOTATION_KEYWORD, ENUM_KEYWORD, COMPANION_KEYWORD) + ENUM_KEYWORD, COMPANION_KEYWORD) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/psi/stubs/elements/JetFileElementType.java b/compiler/frontend/src/org/jetbrains/kotlin/psi/stubs/elements/JetFileElementType.java index 5a4320a31f5..0722bc11f1f 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/psi/stubs/elements/JetFileElementType.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/psi/stubs/elements/JetFileElementType.java @@ -36,7 +36,7 @@ import org.jetbrains.kotlin.psi.stubs.impl.KotlinFileStubImpl; import java.io.IOException; public class JetFileElementType extends IStubFileElementType { - public static final int STUB_VERSION = 49; + public static final int STUB_VERSION = 50; private static final String NAME = "kotlin.FILE"; diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/DeclarationsChecker.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/DeclarationsChecker.java index f84e64e8f68..b2dbd24d6b0 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/DeclarationsChecker.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/DeclarationsChecker.java @@ -128,9 +128,6 @@ public class DeclarationsChecker { if (declaration.hasModifier(JetTokens.ENUM_KEYWORD)) { trace.report(ILLEGAL_ENUM_ANNOTATION.on(declaration)); } - if (declaration.hasModifier(JetTokens.ANNOTATION_KEYWORD)) { - trace.report(ILLEGAL_ANNOTATION_KEYWORD.on(declaration)); - } } private void checkModifiersAndAnnotationsInPackageDirective(JetFile file) { diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallExpressionResolver.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallExpressionResolver.java index c8018e605c4..51cad1c463d 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallExpressionResolver.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallExpressionResolver.java @@ -269,7 +269,7 @@ public class CallExpressionResolver { else if (parent instanceof JetParameter) { JetClass jetClass = PsiTreeUtil.getParentOfType(parent, JetClass.class); if (jetClass != null) { - return jetClass.hasModifier(JetTokens.ANNOTATION_KEYWORD); + return jetClass.isAnnotation(); } } return false; diff --git a/compiler/testData/builtin-classes.txt b/compiler/testData/builtin-classes.txt index 4f1e251a60d..f161e456fa9 100644 --- a/compiler/testData/builtin-classes.txt +++ b/compiler/testData/builtin-classes.txt @@ -8,6 +8,154 @@ public fun kotlin.Any?.toString(): kotlin.String public interface Annotation { } +public final enum class AnnotationRetention : kotlin.Enum { + public enum entry SOURCE : kotlin.annotation.AnnotationRetention { + /*primary*/ private constructor SOURCE() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationRetention): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry BINARY : kotlin.annotation.AnnotationRetention { + /*primary*/ private constructor BINARY() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationRetention): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry RUNTIME : kotlin.annotation.AnnotationRetention { + /*primary*/ private constructor RUNTIME() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationRetention): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + /*primary*/ private constructor AnnotationRetention() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationRetention): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + + // Static members + public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): kotlin.AnnotationRetention + public final /*synthesized*/ fun values(): kotlin.Array +} + +public final enum class AnnotationTarget : kotlin.Enum { + public enum entry PACKAGE : kotlin.annotation.AnnotationTarget { + /*primary*/ private constructor PACKAGE() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry CLASSIFIER : kotlin.annotation.AnnotationTarget { + /*primary*/ private constructor CLASSIFIER() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry ANNOTATION_CLASS : kotlin.annotation.AnnotationTarget { + /*primary*/ private constructor ANNOTATION_CLASS() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry TYPE_PARAMETER : kotlin.annotation.AnnotationTarget { + /*primary*/ private constructor TYPE_PARAMETER() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry PROPERTY : kotlin.annotation.AnnotationTarget { + /*primary*/ private constructor PROPERTY() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry FIELD : kotlin.annotation.AnnotationTarget { + /*primary*/ private constructor FIELD() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry LOCAL_VARIABLE : kotlin.annotation.AnnotationTarget { + /*primary*/ private constructor LOCAL_VARIABLE() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry VALUE_PARAMETER : kotlin.annotation.AnnotationTarget { + /*primary*/ private constructor VALUE_PARAMETER() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry CONSTRUCTOR : kotlin.annotation.AnnotationTarget { + /*primary*/ private constructor CONSTRUCTOR() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry FUNCTION : kotlin.annotation.AnnotationTarget { + /*primary*/ private constructor FUNCTION() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry PROPERTY_GETTER : kotlin.annotation.AnnotationTarget { + /*primary*/ private constructor PROPERTY_GETTER() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry PROPERTY_SETTER : kotlin.annotation.AnnotationTarget { + /*primary*/ private constructor PROPERTY_SETTER() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry TYPE : kotlin.annotation.AnnotationTarget { + /*primary*/ private constructor TYPE() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry EXPRESSION : kotlin.annotation.AnnotationTarget { + /*primary*/ private constructor EXPRESSION() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + public enum entry FILE : kotlin.annotation.AnnotationTarget { + /*primary*/ private constructor FILE() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + } + + /*primary*/ private constructor AnnotationTarget() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.AnnotationTarget): kotlin.Int + public final override /*1*/ /*fake_override*/ fun name(): kotlin.String + public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int + + // Static members + public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): kotlin.AnnotationTarget + public final /*synthesized*/ fun values(): kotlin.Array +} + public open class Any { /*primary*/ public constructor Any() } @@ -1261,7 +1409,15 @@ public object Unit { /*primary*/ private constructor Unit() } -kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER}) public final annotation class data : kotlin.Annotation { +kotlin.annotation.target(allowedTargets = {AnnotationTarget.ANNOTATION_CLASS}) public final annotation class annotation : kotlin.Annotation { + /*primary*/ public constructor __annotation(/*0*/ retention: kotlin.AnnotationRetention = ..., /*1*/ repeatable: kotlin.Boolean = ...) + internal final val repeatable: kotlin.Boolean + internal final fun (): kotlin.Boolean + internal final val retention: kotlin.AnnotationRetention + internal final fun (): kotlin.AnnotationRetention +} + +kotlin.annotation.target(allowedTargets = {AnnotationTarget.ANNOTATION_CLASS}) public final annotation class data : kotlin.Annotation { /*primary*/ public constructor data() } @@ -1299,6 +1455,12 @@ kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER, Annotati internal final fun (): kotlin.Array } -kotlin.annotation.target(allowedTargets = {AnnotationTarget.FUNCTION}) public final annotation class tailRecursive : kotlin.Annotation { +kotlin.target(allowedTargets = {AnnotationTarget.FUNCTION}) public final annotation class tailRecursive : kotlin.Annotation { /*primary*/ public constructor tailRecursive() } + +kotlin.target(allowedTargets = {AnnotationTarget.CLASSIFIER}) public final annotation class target : kotlin.Annotation { + /*primary*/ public constructor target(/*0*/ vararg allowedTargets: kotlin.AnnotationTarget /*kotlin.Array*/) + internal final val allowedTargets: kotlin.Array + internal final fun (): kotlin.Array +} diff --git a/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationClass.txt b/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationClass.txt index 04893348d74..72aa9140eaf 100644 --- a/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationClass.txt +++ b/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationClass.txt @@ -1,36 +1,36 @@ package test -internal final annotation class AByte : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AByte : kotlin.Annotation { public constructor AByte(/*0*/ kotlin.Byte) internal final val value: kotlin.Byte } -internal final annotation class AChar : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AChar : kotlin.Annotation { public constructor AChar(/*0*/ kotlin.Char) internal final val value: kotlin.Char } -internal final annotation class ADouble : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ADouble : kotlin.Annotation { public constructor ADouble(/*0*/ kotlin.Double) internal final val value: kotlin.Double } -internal final annotation class AFloat : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AFloat : kotlin.Annotation { public constructor AFloat(/*0*/ kotlin.Float) internal final val value: kotlin.Float } -internal final annotation class AInt : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AInt : kotlin.Annotation { public constructor AInt(/*0*/ kotlin.Int) internal final val value: kotlin.Int } -internal final annotation class ALong : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ALong : kotlin.Annotation { public constructor ALong(/*0*/ kotlin.Long) internal final val value: kotlin.Long } -internal final annotation class AString : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AString : kotlin.Annotation { public constructor AString(/*0*/ kotlin.String) internal final val value: kotlin.String } diff --git a/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.txt b/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.txt index 98cd5456308..d9be3db2f41 100644 --- a/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.txt +++ b/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.txt @@ -1,36 +1,36 @@ package test -internal final annotation class AByte : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AByte : kotlin.Annotation { public constructor AByte(/*0*/ kotlin.Byte) internal final val value: kotlin.Byte } -internal final annotation class AChar : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AChar : kotlin.Annotation { public constructor AChar(/*0*/ kotlin.Char) internal final val value: kotlin.Char } -internal final annotation class ADouble : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ADouble : kotlin.Annotation { public constructor ADouble(/*0*/ kotlin.Double) internal final val value: kotlin.Double } -internal final annotation class AFloat : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AFloat : kotlin.Annotation { public constructor AFloat(/*0*/ kotlin.Float) internal final val value: kotlin.Float } -internal final annotation class AInt : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AInt : kotlin.Annotation { public constructor AInt(/*0*/ kotlin.Int) internal final val value: kotlin.Int } -internal final annotation class ALong : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ALong : kotlin.Annotation { public constructor ALong(/*0*/ kotlin.Long) internal final val value: kotlin.Long } -internal final annotation class AString : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AString : kotlin.Annotation { public constructor AString(/*0*/ kotlin.String) internal final val value: kotlin.String } diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/missingEnumReferencedInAnnotationArgument.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/missingEnumReferencedInAnnotationArgument.txt index 2647ef88568..cb2b210d1d8 100644 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/missingEnumReferencedInAnnotationArgument.txt +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/missingEnumReferencedInAnnotationArgument.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { public constructor Anno(/*0*/ e: [ERROR : test.E]) internal final val e: [ERROR : test.E] } diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotatedConstructor.txt b/compiler/testData/diagnostics/tests/annotations/AnnotatedConstructor.txt index 24db66192dc..be859092854 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotatedConstructor.txt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotatedConstructor.txt @@ -8,7 +8,7 @@ internal final class Annotated { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectFun.txt b/compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectFun.txt index 21dbc11cf3e..a8cb2ef610e 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectFun.txt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectFun.txt @@ -2,7 +2,7 @@ package internal fun foo(): kotlin.Unit -internal final annotation class My : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation 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 diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectProperty.txt b/compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectProperty.txt index f382ca4e9e7..b1d5e2f3548 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectProperty.txt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectProperty.txt @@ -2,7 +2,7 @@ package internal fun foo(): kotlin.Int -internal final annotation class My : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation 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 diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotatedLoop.txt b/compiler/testData/diagnostics/tests/annotations/AnnotatedLoop.txt index 21dbc11cf3e..a8cb2ef610e 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotatedLoop.txt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotatedLoop.txt @@ -2,7 +2,7 @@ package internal fun foo(): kotlin.Unit -internal final annotation class My : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation 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 diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotatedResultType.txt b/compiler/testData/diagnostics/tests/annotations/AnnotatedResultType.txt index bf4e310fa60..5ca42a7522c 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotatedResultType.txt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotatedResultType.txt @@ -2,7 +2,7 @@ package internal fun foo(): @[My(x = IntegerValueType(42))] kotlin.Int -internal final annotation class My : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class My : kotlin.Annotation { public constructor My(/*0*/ x: kotlin.Int) internal final val x: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotatedTryCatch.txt b/compiler/testData/diagnostics/tests/annotations/AnnotatedTryCatch.txt index 8df46703222..ed5812bd39b 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotatedTryCatch.txt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotatedTryCatch.txt @@ -2,7 +2,7 @@ package internal fun foo(/*0*/ arg: kotlin.Int): kotlin.Int -internal final annotation class My : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation 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 diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationAsDefaultParameter.kt b/compiler/testData/diagnostics/tests/annotations/AnnotationAsDefaultParameter.kt new file mode 100644 index 00000000000..4d09e688396 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/AnnotationAsDefaultParameter.kt @@ -0,0 +1,5 @@ +annotation class Base(val x: Int) + +annotation class UseBase(val b: Base = Base(0)) + +UseBase class My diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationAsDefaultParameter.txt b/compiler/testData/diagnostics/tests/annotations/AnnotationAsDefaultParameter.txt new file mode 100644 index 00000000000..8da2e8abffe --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/AnnotationAsDefaultParameter.txt @@ -0,0 +1,24 @@ +package + +kotlin.annotation.annotation() internal final annotation class Base : kotlin.Annotation { + public constructor Base(/*0*/ x: kotlin.Int) + internal final val x: kotlin.Int + 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 +} + +UseBase() internal final class My { + 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 + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +kotlin.annotation.annotation() internal final annotation class UseBase : kotlin.Annotation { + public constructor UseBase(/*0*/ b: Base = ...) + internal final val b: 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 +} diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.txt b/compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.txt index 62b649f6ceb..63336f0c387 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.txt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.txt @@ -1,13 +1,13 @@ package -internal final annotation class A1 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A1 : kotlin.Annotation { public constructor A1() 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 } -internal final annotation class A2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A2 : kotlin.Annotation { public constructor A2(/*0*/ some: kotlin.Int = ...) internal final val some: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.txt b/compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.txt index 018ee58aa90..a8f7f0581dc 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.txt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.txt @@ -2,14 +2,14 @@ package internal fun topFun(): kotlin.Int -internal final annotation class A1 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A1 : kotlin.Annotation { public constructor A1() 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 } -internal final annotation class A2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A2 : kotlin.Annotation { public constructor A2(/*0*/ some: kotlin.Int = ...) internal final val some: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationOnObject.txt b/compiler/testData/diagnostics/tests/annotations/AnnotationOnObject.txt index 8eebf0033a6..ac01753b989 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotationOnObject.txt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotationOnObject.txt @@ -2,7 +2,7 @@ package package test { - internal final annotation class A : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class A : kotlin.Annotation { public constructor A(/*0*/ a: kotlin.Int = ..., /*1*/ b: kotlin.String = ..., /*2*/ c: kotlin.String) internal final val a: kotlin.Int internal final val b: kotlin.String diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationsForClasses.txt b/compiler/testData/diagnostics/tests/annotations/AnnotationsForClasses.txt index a6c370183cd..db0de398de3 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotationsForClasses.txt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotationsForClasses.txt @@ -1,13 +1,13 @@ package -java.lang.Deprecated() internal final annotation class my : kotlin.Annotation { +kotlin.annotation.annotation() java.lang.Deprecated() internal final annotation 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 public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -java.lang.Deprecated() internal final annotation class my1 : kotlin.Annotation { +kotlin.annotation.annotation() java.lang.Deprecated() internal final annotation class my1 : kotlin.Annotation { public constructor my1() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.txt b/compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.txt index d7945ba9075..2cd7c1a72e4 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.txt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.txt @@ -2,14 +2,14 @@ package internal val topProp: kotlin.Int = 12 -internal final annotation class A1 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A1 : kotlin.Annotation { public constructor A1() 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 } -internal final annotation class A2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A2 : kotlin.Annotation { public constructor A2(/*0*/ some: kotlin.Int = ...) internal final val some: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/BasicAnnotations.txt b/compiler/testData/diagnostics/tests/annotations/BasicAnnotations.txt index ca8b44cb323..c7a9a1acc1e 100644 --- a/compiler/testData/diagnostics/tests/annotations/BasicAnnotations.txt +++ b/compiler/testData/diagnostics/tests/annotations/BasicAnnotations.txt @@ -7,14 +7,14 @@ my2() internal fun foo4(): kotlin.Unit my2() internal fun foo41(): kotlin.Unit my2(i = IntegerValueType(2)) internal fun foo42(): kotlin.Unit -internal final annotation class my : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation 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 public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class my1 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class my1 : kotlin.Annotation { public constructor my1(/*0*/ i: kotlin.Int) internal final val i: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -22,7 +22,7 @@ internal final annotation class my1 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class my2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class my2 : kotlin.Annotation { public constructor my2(/*0*/ i: kotlin.Int = ...) internal final val i: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/ConstructorCall.txt b/compiler/testData/diagnostics/tests/annotations/ConstructorCall.txt index 0c2884b2794..fe2358c16c2 100644 --- a/compiler/testData/diagnostics/tests/annotations/ConstructorCall.txt +++ b/compiler/testData/diagnostics/tests/annotations/ConstructorCall.txt @@ -7,14 +7,14 @@ internal fun foo(): kotlin.Unit internal fun javaClass(): java.lang.Class internal fun kotlin.String.invoke(): kotlin.Unit -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann() 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 } -internal final annotation class Ann1 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann1 : kotlin.Annotation { public constructor Ann1(/*0*/ a: kotlin.Int) internal final val a: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -22,7 +22,7 @@ internal final annotation class Ann1 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann2 : kotlin.Annotation { public constructor Ann2(/*0*/ a: Ann1) internal final val a: Ann1 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -30,7 +30,7 @@ internal final annotation class Ann2 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann3 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann3 : kotlin.Annotation { public constructor Ann3(/*0*/ a: Ann1 = ...) internal final val a: Ann1 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -38,7 +38,7 @@ internal final annotation class Ann3 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann4 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann4 : kotlin.Annotation { public constructor Ann4(/*0*/ value: kotlin.String) internal final val value: kotlin.String public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/DanglingInScript.kt b/compiler/testData/diagnostics/tests/annotations/DanglingInScript.kt index e5ea165258e..aaa6c306aeb 100644 --- a/compiler/testData/diagnostics/tests/annotations/DanglingInScript.kt +++ b/compiler/testData/diagnostics/tests/annotations/DanglingInScript.kt @@ -1,5 +1,5 @@ // FILE: script.kts -annotation class Ann +@annotation class Ann @Ann \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/DanglingMixed.txt b/compiler/testData/diagnostics/tests/annotations/DanglingMixed.txt index f6b20078b1e..7d717629e2a 100644 --- a/compiler/testData/diagnostics/tests/annotations/DanglingMixed.txt +++ b/compiler/testData/diagnostics/tests/annotations/DanglingMixed.txt @@ -1,13 +1,13 @@ package -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann() 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 } -internal final annotation class Ann2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann2 : kotlin.Annotation { public constructor Ann2() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/DanglingNoBrackets.txt b/compiler/testData/diagnostics/tests/annotations/DanglingNoBrackets.txt index 9c246457a26..73272a69e57 100644 --- a/compiler/testData/diagnostics/tests/annotations/DanglingNoBrackets.txt +++ b/compiler/testData/diagnostics/tests/annotations/DanglingNoBrackets.txt @@ -1,6 +1,6 @@ package -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/DanglingWithBrackets.txt b/compiler/testData/diagnostics/tests/annotations/DanglingWithBrackets.txt index ecc8869fdd9..49b1179cd42 100644 --- a/compiler/testData/diagnostics/tests/annotations/DanglingWithBrackets.txt +++ b/compiler/testData/diagnostics/tests/annotations/DanglingWithBrackets.txt @@ -1,6 +1,6 @@ package -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/JavaAnnotationConstructors.txt b/compiler/testData/diagnostics/tests/annotations/JavaAnnotationConstructors.txt index f5009eff58f..d7458d0cc85 100644 --- a/compiler/testData/diagnostics/tests/annotations/JavaAnnotationConstructors.txt +++ b/compiler/testData/diagnostics/tests/annotations/JavaAnnotationConstructors.txt @@ -1,13 +1,13 @@ package -java.lang.annotation.Retention(value = RetentionPolicy.CLASS) internal final annotation class my : kotlin.Annotation { +kotlin.annotation.annotation() java.lang.annotation.Retention(value = RetentionPolicy.CLASS) internal final annotation 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 public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR}) internal final annotation class my1 : kotlin.Annotation { +kotlin.annotation.annotation() java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME) java.lang.annotation.Target(value = {ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR}) internal final annotation class my1 : kotlin.Annotation { public constructor my1() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.txt b/compiler/testData/diagnostics/tests/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.txt index 1a968299ed7..a93c3ee35e0 100644 --- a/compiler/testData/diagnostics/tests/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.txt +++ b/compiler/testData/diagnostics/tests/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.txt @@ -3,7 +3,7 @@ package ann() internal fun bar(): kotlin.Int ann() internal fun foo(): kotlin.Int -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann(/*0*/ x: kotlin.Int) internal final val x: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotated.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotated.txt index fb9a04575dc..cd8b8330b27 100644 --- a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotated.txt +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotated.txt @@ -1,6 +1,6 @@ package -RecursivelyAnnotated(x = IntegerValueType(1)) internal final annotation class RecursivelyAnnotated : kotlin.Annotation { +RecursivelyAnnotated(x = IntegerValueType(1)) kotlin.annotation.annotation() internal final annotation class RecursivelyAnnotated : kotlin.Annotation { public constructor RecursivelyAnnotated(/*0*/ x: kotlin.Int) internal final val x: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedFunctionParameter.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedFunctionParameter.txt index 06458119e3f..7e02bec3b7f 100644 --- a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedFunctionParameter.txt +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedFunctionParameter.txt @@ -2,7 +2,7 @@ package internal fun foo(/*0*/ ann() x: kotlin.Int): kotlin.Int -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann(/*0*/ x: kotlin.Int) internal final val x: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalFunction.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalFunction.txt index d2c0ba12aba..2a8ee5a14b7 100644 --- a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalFunction.txt +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalFunction.txt @@ -2,7 +2,7 @@ package ann() internal fun foo(): kotlin.Int -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann(/*0*/ x: kotlin.Int) internal final val x: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalProperty.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalProperty.txt index f8efd97dd87..e876d7bfe73 100644 --- a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalProperty.txt +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalProperty.txt @@ -2,7 +2,7 @@ package ann(x = 1) internal val x: kotlin.Int = 1 -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann(/*0*/ x: kotlin.Int) internal final val x: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameter.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameter.txt index f2ba95e7bb6..63856371b5a 100644 --- a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameter.txt +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameter.txt @@ -1,6 +1,6 @@ package -internal final annotation class RecursivelyAnnotated : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class RecursivelyAnnotated : kotlin.Annotation { public constructor RecursivelyAnnotated(/*0*/ RecursivelyAnnotated(x = IntegerValueType(1)) x: kotlin.Int) RecursivelyAnnotated(x = IntegerValueType(1)) internal final val x: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterType.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterType.txt index 65b104b7cec..05e163c56fd 100644 --- a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterType.txt +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterType.txt @@ -1,6 +1,6 @@ package -internal final annotation class RecursivelyAnnotated : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class RecursivelyAnnotated : kotlin.Annotation { public constructor RecursivelyAnnotated(/*0*/ x: @[RecursivelyAnnotated(x = IntegerValueType(1))] kotlin.Int) internal final val x: @[RecursivelyAnnotated(x = IntegerValueType(1))] kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterWithAt.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterWithAt.txt index f2ba95e7bb6..63856371b5a 100644 --- a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterWithAt.txt +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterWithAt.txt @@ -1,6 +1,6 @@ package -internal final annotation class RecursivelyAnnotated : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class RecursivelyAnnotated : kotlin.Annotation { public constructor RecursivelyAnnotated(/*0*/ RecursivelyAnnotated(x = IntegerValueType(1)) x: kotlin.Int) RecursivelyAnnotated(x = IntegerValueType(1)) internal final val x: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedProperty.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedProperty.txt index 3e9d365c990..2083a6eef89 100644 --- a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedProperty.txt +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedProperty.txt @@ -8,7 +8,7 @@ internal final class My { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann(/*0*/ x: kotlin.Int) internal final val x: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/WrongAnnotationArgsOnObject.txt b/compiler/testData/diagnostics/tests/annotations/WrongAnnotationArgsOnObject.txt index 21d20839c5c..44f8f2ffc6c 100644 --- a/compiler/testData/diagnostics/tests/annotations/WrongAnnotationArgsOnObject.txt +++ b/compiler/testData/diagnostics/tests/annotations/WrongAnnotationArgsOnObject.txt @@ -3,7 +3,7 @@ package package test { internal val some: test.SomeObject - internal final annotation class BadAnnotation : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class BadAnnotation : kotlin.Annotation { public constructor BadAnnotation(/*0*/ s: kotlin.String) internal final val s: kotlin.String public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/annotationInheritance.txt b/compiler/testData/diagnostics/tests/annotations/annotationInheritance.txt index f65d2209b73..4bcbbaf7487 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationInheritance.txt +++ b/compiler/testData/diagnostics/tests/annotations/annotationInheritance.txt @@ -2,28 +2,28 @@ package internal val a: T -internal final annotation class Ann : C { +kotlin.annotation.annotation() internal final annotation class Ann : C { public constructor Ann() 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 } -internal final annotation class Ann2 : T { +kotlin.annotation.annotation() internal final annotation class Ann2 : T { public constructor Ann2() 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 } -internal final annotation class Ann3 : T { +kotlin.annotation.annotation() internal final annotation class Ann3 : T { public constructor Ann3() 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 } -internal final annotation class Ann4 : C, T { +kotlin.annotation.annotation() internal final annotation class Ann4 : C, T { public constructor Ann4() public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/annotationModifier.kt b/compiler/testData/diagnostics/tests/annotations/annotationModifier.kt index 8c5e211eead..a62a21476bb 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationModifier.kt +++ b/compiler/testData/diagnostics/tests/annotations/annotationModifier.kt @@ -1,15 +1,15 @@ annotation class B class A { - annotation companion object {} + annotation companion object {} } -annotation object O {} +annotation object O {} -annotation interface T {} +annotation interface T {} -annotation fun f() = 0 +annotation fun f() = 0 -annotation val x = 0 +annotation val x = 0 -annotation var y = 0 +annotation var y = 0 \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/annotationModifier.txt b/compiler/testData/diagnostics/tests/annotations/annotationModifier.txt index a576fe07507..89ed33fb51f 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationModifier.txt +++ b/compiler/testData/diagnostics/tests/annotations/annotationModifier.txt @@ -1,8 +1,8 @@ package -internal val x: kotlin.Int = 0 -internal var y: kotlin.Int -internal fun f(): kotlin.Int +kotlin.annotation.annotation() internal val x: kotlin.Int = 0 +kotlin.annotation.annotation() internal var y: kotlin.Int +kotlin.annotation.annotation() internal fun f(): kotlin.Int internal final class A { public constructor A() @@ -10,7 +10,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - public companion object Companion { + kotlin.annotation.annotation() public companion object Companion { private constructor Companion() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -18,21 +18,21 @@ internal final class A { } } -internal final annotation class B : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class B : kotlin.Annotation { public constructor B() 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 } -internal object O { +kotlin.annotation.annotation() internal object O { private constructor O() 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 } -internal interface T : kotlin.Annotation { +kotlin.annotation.annotation() internal interface T : kotlin.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 public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String diff --git a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/booleanLocalVal.txt b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/booleanLocalVal.txt index 98b3a61f3a6..0cebb69f97e 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/booleanLocalVal.txt +++ b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/booleanLocalVal.txt @@ -2,7 +2,7 @@ package internal fun foo(): kotlin.Unit -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ vararg i: kotlin.Boolean /*kotlin.BooleanArray*/) internal final val i: kotlin.BooleanArray public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/compareAndEquals.txt b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/compareAndEquals.txt index 98b3a61f3a6..0cebb69f97e 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/compareAndEquals.txt +++ b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/compareAndEquals.txt @@ -2,7 +2,7 @@ package internal fun foo(): kotlin.Unit -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ vararg i: kotlin.Boolean /*kotlin.BooleanArray*/) internal final val i: kotlin.BooleanArray public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst.txt b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst.txt index 9548f773149..374ce3a0743 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst.txt +++ b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst.txt @@ -2,7 +2,7 @@ package internal val e: MyEnum -internal final annotation class AnnE : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AnnE : kotlin.Annotation { public constructor AnnE(/*0*/ i: MyEnum) internal final val i: MyEnum public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/javaProperties.txt b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/javaProperties.txt index 60ec1a463c3..f668b06ebe5 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/javaProperties.txt +++ b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/javaProperties.txt @@ -7,7 +7,7 @@ Ann(i = {1, 1, 1}) internal final class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ vararg i: kotlin.Int /*kotlin.IntArray*/) internal final val i: kotlin.IntArray public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/kotlinProperties.txt b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/kotlinProperties.txt index 8f8c736994c..7ea52668e62 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/kotlinProperties.txt +++ b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/kotlinProperties.txt @@ -7,7 +7,7 @@ internal val i4: kotlin.Int = 1 internal var i5: kotlin.Int internal var i6: kotlin.Int -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ vararg i: kotlin.Int /*kotlin.IntArray*/) internal final val i: kotlin.IntArray public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/strings.txt b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/strings.txt index 65763ee3097..84691e400a0 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/strings.txt +++ b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/strings.txt @@ -3,7 +3,7 @@ package internal val topLevel: kotlin.String = "topLevel" internal fun foo(): kotlin.Unit -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ vararg i: kotlin.String /*kotlin.Array*/) internal final val i: kotlin.Array public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/annotationsOnLambdaAsCallArgument.txt b/compiler/testData/diagnostics/tests/annotations/annotationsOnLambdaAsCallArgument.txt index e765ee0269a..b0dcaa535f8 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationsOnLambdaAsCallArgument.txt +++ b/compiler/testData/diagnostics/tests/annotations/annotationsOnLambdaAsCallArgument.txt @@ -3,7 +3,7 @@ package kotlin.inline() internal fun bar(/*0*/ block: () -> kotlin.Int): kotlin.Int internal fun foo(): kotlin.Unit -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ x: kotlin.Int = ...) internal final val x: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.txt b/compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.txt index f52947cfa19..d8bc8365b8d 100644 --- a/compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.txt +++ b/compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.txt @@ -10,7 +10,7 @@ Ann(x = IntegerValueType(1)) Ann(x = IntegerValueType(2)) Ann(x = IntegerValueTy public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ x: kotlin.Int = ...) internal final val x: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/extensionFunctionType.txt b/compiler/testData/diagnostics/tests/annotations/extensionFunctionType.txt index dbef146c30d..b23c290f7d9 100644 --- a/compiler/testData/diagnostics/tests/annotations/extensionFunctionType.txt +++ b/compiler/testData/diagnostics/tests/annotations/extensionFunctionType.txt @@ -10,7 +10,7 @@ internal interface Some { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/forParameterAnnotationResolve.txt b/compiler/testData/diagnostics/tests/annotations/forParameterAnnotationResolve.txt index 585ecd5808b..a83e76784e4 100644 --- a/compiler/testData/diagnostics/tests/annotations/forParameterAnnotationResolve.txt +++ b/compiler/testData/diagnostics/tests/annotations/forParameterAnnotationResolve.txt @@ -15,7 +15,7 @@ kotlin.data() internal final class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ x: kotlin.Int) internal final val x: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/invalidTypesInAnnotationConstructor.txt b/compiler/testData/diagnostics/tests/annotations/invalidTypesInAnnotationConstructor.txt index d5a67e9a496..68ca164db63 100644 --- a/compiler/testData/diagnostics/tests/annotations/invalidTypesInAnnotationConstructor.txt +++ b/compiler/testData/diagnostics/tests/annotations/invalidTypesInAnnotationConstructor.txt @@ -2,7 +2,7 @@ package package test { - internal final annotation class Ann1 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class Ann1 : kotlin.Annotation { public constructor Ann1(/*0*/ p1: kotlin.Int, /*1*/ p2: kotlin.Byte, /*2*/ p3: kotlin.Short, /*3*/ p4: kotlin.Long, /*4*/ p5: kotlin.Double, /*5*/ p6: kotlin.Float, /*6*/ p7: kotlin.Char, /*7*/ p8: kotlin.Boolean) internal final val p1: kotlin.Int internal final val p2: kotlin.Byte @@ -17,7 +17,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class Ann2 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class Ann2 : kotlin.Annotation { public constructor Ann2(/*0*/ p1: kotlin.String) internal final val p1: kotlin.String public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -25,7 +25,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class Ann3 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class Ann3 : kotlin.Annotation { public constructor Ann3(/*0*/ p1: test.Ann1) internal final val p1: test.Ann1 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -33,7 +33,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class Ann4 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class Ann4 : kotlin.Annotation { public constructor Ann4(/*0*/ p1: kotlin.IntArray, /*1*/ p2: kotlin.ByteArray, /*2*/ p3: kotlin.ShortArray, /*3*/ p4: kotlin.LongArray, /*4*/ p5: kotlin.DoubleArray, /*5*/ p6: kotlin.FloatArray, /*6*/ p7: kotlin.CharArray, /*7*/ p8: kotlin.BooleanArray) internal final val p1: kotlin.IntArray internal final val p2: kotlin.ByteArray @@ -48,7 +48,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class Ann5 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class Ann5 : kotlin.Annotation { public constructor Ann5(/*0*/ p1: test.MyEnum) internal final val p1: test.MyEnum public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -56,7 +56,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class Ann6 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class Ann6 : kotlin.Annotation { public constructor Ann6(/*0*/ p: java.lang.Class<*>) internal final val p: java.lang.Class<*> public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -64,7 +64,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class Ann7 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class Ann7 : kotlin.Annotation { public constructor Ann7(/*0*/ p: java.lang.annotation.RetentionPolicy) internal final val p: java.lang.annotation.RetentionPolicy public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -72,7 +72,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class Ann8 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class Ann8 : kotlin.Annotation { public constructor Ann8(/*0*/ p1: kotlin.Array, /*1*/ p2: kotlin.Array>, /*2*/ p3: kotlin.Array, /*3*/ p4: kotlin.Array) internal final val p1: kotlin.Array internal final val p2: kotlin.Array> @@ -83,7 +83,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class Ann9 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class Ann9 : kotlin.Annotation { public constructor Ann9(/*0*/ vararg p1: kotlin.String /*kotlin.Array*/, /*1*/ vararg p2: java.lang.Class<*> /*kotlin.Array>*/, /*2*/ vararg p3: test.MyEnum /*kotlin.Array*/, /*3*/ vararg p4: test.Ann1 /*kotlin.Array*/, /*4*/ vararg p5: kotlin.Int /*kotlin.IntArray*/) internal final val p1: kotlin.Array internal final val p2: kotlin.Array> @@ -95,7 +95,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class InAnn1 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class InAnn1 : kotlin.Annotation { public constructor InAnn1(/*0*/ p1: kotlin.Int?, /*1*/ p3: kotlin.Short?, /*2*/ p4: kotlin.Long?, /*3*/ p5: kotlin.Double?, /*4*/ p6: kotlin.Float?, /*5*/ p7: kotlin.Char?, /*6*/ p8: kotlin.Boolean?) internal final val p1: kotlin.Int? internal final val p3: kotlin.Short? @@ -109,7 +109,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class InAnn10 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class InAnn10 : kotlin.Annotation { public constructor InAnn10(/*0*/ p1: kotlin.String?) internal final val p1: kotlin.String? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -117,7 +117,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class InAnn11 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class InAnn11 : kotlin.Annotation { public constructor InAnn11(/*0*/ p1: test.Ann1?) internal final val p1: test.Ann1? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -125,7 +125,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class InAnn12 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class InAnn12 : kotlin.Annotation { public constructor InAnn12(/*0*/ p1: test.MyEnum?) internal final val p1: test.MyEnum? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -133,7 +133,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class InAnn4 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class InAnn4 : kotlin.Annotation { public constructor InAnn4(/*0*/ p1: kotlin.Array, /*1*/ p2: kotlin.Array?) internal final val p1: kotlin.Array internal final val p2: kotlin.Array? @@ -142,7 +142,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class InAnn6 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class InAnn6 : kotlin.Annotation { public constructor InAnn6(/*0*/ p: java.lang.Class<*>?) internal final val p: java.lang.Class<*>? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -150,7 +150,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class InAnn7 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class InAnn7 : kotlin.Annotation { public constructor InAnn7(/*0*/ p: java.lang.annotation.RetentionPolicy?) internal final val p: java.lang.annotation.RetentionPolicy? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -158,7 +158,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class InAnn8 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class InAnn8 : kotlin.Annotation { public constructor InAnn8(/*0*/ p1: kotlin.Array, /*1*/ p2: kotlin.Array, /*2*/ p3: kotlin.Array, /*3*/ p4: kotlin.Array) internal final val p1: kotlin.Array internal final val p2: kotlin.Array @@ -169,7 +169,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class InAnn9 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class InAnn9 : kotlin.Annotation { public constructor InAnn9(/*0*/ p: test.MyClass) internal final val p: test.MyClass public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/kt1860-positive.txt b/compiler/testData/diagnostics/tests/annotations/kt1860-positive.txt index 47eb0519cf7..5f9436f463d 100644 --- a/compiler/testData/diagnostics/tests/annotations/kt1860-positive.txt +++ b/compiler/testData/diagnostics/tests/annotations/kt1860-positive.txt @@ -11,7 +11,7 @@ internal final class Hello { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class test : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class test : kotlin.Annotation { public constructor test() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.txt b/compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.txt index eace797f536..dc668dc34c9 100644 --- a/compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.txt +++ b/compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.txt @@ -1,20 +1,20 @@ package -internal final annotation class Annotation1 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Annotation1 : kotlin.Annotation { public constructor Annotation1() 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 } -internal final annotation class Annotation10 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Annotation10 : kotlin.Annotation { public constructor Annotation10() 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 } -internal final annotation class Annotation2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Annotation2 : kotlin.Annotation { public constructor Annotation2() public final val s: kotlin.String = "" public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -22,7 +22,7 @@ internal final annotation class Annotation2 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Annotation3 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Annotation3 : kotlin.Annotation { public constructor Annotation3() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public final fun foo(): kotlin.Unit @@ -30,7 +30,7 @@ internal final annotation class Annotation3 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Annotation4 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Annotation4 : kotlin.Annotation { public constructor Annotation4() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -44,7 +44,7 @@ internal final annotation class Annotation4 : kotlin.Annotation { } } -internal final annotation class Annotation5 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Annotation5 : kotlin.Annotation { public constructor Annotation5() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -58,14 +58,14 @@ internal final annotation class Annotation5 : kotlin.Annotation { } } -internal final annotation class Annotation6 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Annotation6 : kotlin.Annotation { public constructor Annotation6() 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 } -internal final annotation class Annotation7 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Annotation7 : kotlin.Annotation { public constructor Annotation7(/*0*/ name: kotlin.String) internal final val name: kotlin.String public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -73,7 +73,7 @@ internal final annotation class Annotation7 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Annotation8 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Annotation8 : kotlin.Annotation { public constructor Annotation8(/*0*/ name: kotlin.String = ...) internal final var name: kotlin.String public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -81,7 +81,7 @@ internal final annotation class Annotation8 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Annotation9 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Annotation9 : kotlin.Annotation { public constructor Annotation9(/*0*/ name: kotlin.String) internal final val name: kotlin.String public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/missingValOnParameter.txt b/compiler/testData/diagnostics/tests/annotations/missingValOnParameter.txt index 7811b7df8c2..2ad51fa26d7 100644 --- a/compiler/testData/diagnostics/tests/annotations/missingValOnParameter.txt +++ b/compiler/testData/diagnostics/tests/annotations/missingValOnParameter.txt @@ -1,6 +1,6 @@ package -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int, /*2*/ c: kotlin.String) internal final val a: kotlin.Int internal final var b: kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/noNameProperty.txt b/compiler/testData/diagnostics/tests/annotations/noNameProperty.txt index f6c24f088a1..34a8a5548bd 100644 --- a/compiler/testData/diagnostics/tests/annotations/noNameProperty.txt +++ b/compiler/testData/diagnostics/tests/annotations/noNameProperty.txt @@ -1,6 +1,6 @@ package -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ x: kotlin.Int, /*1*/ : [ERROR : Type annotation was missing for parameter ]) internal final val : [ERROR : Annotation is absent] internal final val x: kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/onExpression.txt b/compiler/testData/diagnostics/tests/annotations/onExpression.txt index b081ffe6529..882524e7529 100644 --- a/compiler/testData/diagnostics/tests/annotations/onExpression.txt +++ b/compiler/testData/diagnostics/tests/annotations/onExpression.txt @@ -2,7 +2,7 @@ package internal fun foo(): kotlin.Int -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/onFunctionParameter.txt b/compiler/testData/diagnostics/tests/annotations/onFunctionParameter.txt index bceef25b890..a9365dcac93 100644 --- a/compiler/testData/diagnostics/tests/annotations/onFunctionParameter.txt +++ b/compiler/testData/diagnostics/tests/annotations/onFunctionParameter.txt @@ -4,7 +4,7 @@ internal val bar: (kotlin.Int) -> kotlin.Unit internal val bas: (kotlin.Int) -> kotlin.Unit internal fun test(/*0*/ ann() p: kotlin.Int): kotlin.Unit -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/onInitializer.txt b/compiler/testData/diagnostics/tests/annotations/onInitializer.txt index 56ed2530a13..b15a7444d68 100644 --- a/compiler/testData/diagnostics/tests/annotations/onInitializer.txt +++ b/compiler/testData/diagnostics/tests/annotations/onInitializer.txt @@ -13,7 +13,7 @@ internal interface T { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/onLoops.txt b/compiler/testData/diagnostics/tests/annotations/onLoops.txt index 1023249041d..fc0855189ee 100644 --- a/compiler/testData/diagnostics/tests/annotations/onLoops.txt +++ b/compiler/testData/diagnostics/tests/annotations/onLoops.txt @@ -2,7 +2,7 @@ package internal fun test(): kotlin.Unit -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/onLoopsUnreachable.txt b/compiler/testData/diagnostics/tests/annotations/onLoopsUnreachable.txt index 1023249041d..fc0855189ee 100644 --- a/compiler/testData/diagnostics/tests/annotations/onLoopsUnreachable.txt +++ b/compiler/testData/diagnostics/tests/annotations/onLoopsUnreachable.txt @@ -2,7 +2,7 @@ package internal fun test(): kotlin.Unit -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/onMultiDeclaration.txt b/compiler/testData/diagnostics/tests/annotations/onMultiDeclaration.txt index 64919807789..cdc24442601 100644 --- a/compiler/testData/diagnostics/tests/annotations/onMultiDeclaration.txt +++ b/compiler/testData/diagnostics/tests/annotations/onMultiDeclaration.txt @@ -14,7 +14,7 @@ kotlin.data() internal final class P { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/options/annotation.kt b/compiler/testData/diagnostics/tests/annotations/options/annotation.kt new file mode 100644 index 00000000000..fd33f6dff3c --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/options/annotation.kt @@ -0,0 +1,17 @@ +// Annotations used for annotations :) +enum class Target { + CLASSIFIER, + FUNCTION +} + +target(Target.CLASSIFIER) +public annotation class target(vararg val allowedTargets: Target) + +target(Target.CLASSIFIER) +public annotation(AnnotationRetention.SOURCE) class annotation( + val retention: AnnotationRetention = AnnotationRetention.RUNTIME, + val repeatable: Boolean = false +) + +annotation class some + diff --git a/compiler/testData/diagnostics/tests/annotations/options/annotation.txt b/compiler/testData/diagnostics/tests/annotations/options/annotation.txt new file mode 100644 index 00000000000..198ad1c81c6 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/options/annotation.txt @@ -0,0 +1,59 @@ +package + +internal final enum class Target : kotlin.Enum { + public enum entry CLASSIFIER : Target { + private constructor CLASSIFIER() + 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 + } + + public enum entry FUNCTION : Target { + private constructor FUNCTION() + 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 + } + + private constructor Target() + 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(allowedTargets = {Target.CLASSIFIER}) annotation(retention = AnnotationRetention.SOURCE) public final annotation class annotation : kotlin.Annotation { + public constructor annotation(/*0*/ retention: kotlin.annotation.AnnotationRetention = ..., /*1*/ repeatable: kotlin.Boolean = ...) + internal final val repeatable: kotlin.Boolean + internal 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() internal final annotation class some : kotlin.Annotation { + 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 annotation class target : kotlin.Annotation { + public constructor target(/*0*/ vararg allowedTargets: Target /*kotlin.Array*/) + internal final val allowedTargets: kotlin.Array + 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 +} diff --git a/compiler/testData/diagnostics/tests/annotations/options/annotationAsArg.kt b/compiler/testData/diagnostics/tests/annotations/options/annotationAsArg.kt new file mode 100644 index 00000000000..5484366eef0 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/options/annotationAsArg.kt @@ -0,0 +1,14 @@ +class Annotation(val x: Int) { + fun baz() {} + fun bar() = x +} + +fun foo(annotation: Annotation): Int { + if (annotation.bar() == 0) { + annotation.baz() + return 0 + } + else { + return -1 + } +} diff --git a/compiler/testData/diagnostics/tests/annotations/options/annotationAsArg.txt b/compiler/testData/diagnostics/tests/annotations/options/annotationAsArg.txt new file mode 100644 index 00000000000..7d88c4c5161 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/options/annotationAsArg.txt @@ -0,0 +1,13 @@ +package + +internal fun foo(/*0*/ annotation: Annotation): kotlin.Int + +internal final class Annotation { + public constructor Annotation(/*0*/ x: kotlin.Int) + internal final val x: kotlin.Int + internal final fun bar(): kotlin.Int + internal final fun baz(): kotlin.Unit + 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 +} diff --git a/compiler/testData/diagnostics/tests/annotations/options/annotationAsArgComplex.kt b/compiler/testData/diagnostics/tests/annotations/options/annotationAsArgComplex.kt new file mode 100644 index 00000000000..e2c064206da --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/options/annotationAsArgComplex.kt @@ -0,0 +1,10 @@ +// !DIAGNOSTICS: -UNUSED_VARIABLE +class Annotation { + fun setProblemGroup() {} + fun getQuickFixes() = 0 +} + +fun registerQuickFix(annotation: Annotation) { + annotation.setProblemGroup() + val fixes = annotation.getQuickFixes() +} diff --git a/compiler/testData/diagnostics/tests/annotations/options/annotationAsArgComplex.txt b/compiler/testData/diagnostics/tests/annotations/options/annotationAsArgComplex.txt new file mode 100644 index 00000000000..663d7b216bd --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/options/annotationAsArgComplex.txt @@ -0,0 +1,12 @@ +package + +internal fun registerQuickFix(/*0*/ annotation: Annotation): kotlin.Unit + +internal final class Annotation { + public constructor Annotation() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + internal final fun getQuickFixes(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + internal final fun setProblemGroup(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/tests/annotations/options/brackets.kt b/compiler/testData/diagnostics/tests/annotations/options/brackets.kt new file mode 100644 index 00000000000..303fae05cfc --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/options/brackets.kt @@ -0,0 +1,3 @@ +annotation() class emptyBrackets + +emptyBrackets class base diff --git a/compiler/testData/diagnostics/tests/annotations/options/brackets.txt b/compiler/testData/diagnostics/tests/annotations/options/brackets.txt new file mode 100644 index 00000000000..1c973ff3e93 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/options/brackets.txt @@ -0,0 +1,15 @@ +package + +emptyBrackets() internal 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() internal final annotation 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 +} diff --git a/compiler/testData/diagnostics/tests/annotations/options/repeatable.kt b/compiler/testData/diagnostics/tests/annotations/options/repeatable.kt new file mode 100644 index 00000000000..d4080ec2f62 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/options/repeatable.kt @@ -0,0 +1,3 @@ +annotation(repeatable = true) class repann + +repann repann class DoubleAnnotated \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/options/repeatable.txt b/compiler/testData/diagnostics/tests/annotations/options/repeatable.txt new file mode 100644 index 00000000000..cfb2fb1f2fe --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/options/repeatable.txt @@ -0,0 +1,15 @@ +package + +repann() repann() internal final class DoubleAnnotated { + public constructor DoubleAnnotated() + 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(repeatable = true) internal final annotation class repann : kotlin.Annotation { + public constructor repann() + 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 +} diff --git a/compiler/testData/diagnostics/tests/annotations/options/retention.kt b/compiler/testData/diagnostics/tests/annotations/options/retention.kt new file mode 100644 index 00000000000..b2faff44864 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/options/retention.kt @@ -0,0 +1,3 @@ +annotation(AnnotationRetention.SOURCE) class sourceann + +sourceann class AnnotatedAtSource diff --git a/compiler/testData/diagnostics/tests/annotations/options/retention.txt b/compiler/testData/diagnostics/tests/annotations/options/retention.txt new file mode 100644 index 00000000000..679d908bc7d --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/options/retention.txt @@ -0,0 +1,15 @@ +package + +sourceann() internal final class AnnotatedAtSource { + public constructor AnnotatedAtSource() + 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(retention = AnnotationRetention.SOURCE) internal final annotation class sourceann : kotlin.Annotation { + public constructor sourceann() + 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 +} diff --git a/compiler/testData/diagnostics/tests/annotations/options/target.kt b/compiler/testData/diagnostics/tests/annotations/options/target.kt new file mode 100644 index 00000000000..1b47729396a --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/options/target.kt @@ -0,0 +1,5 @@ +target(AnnotationTarget.CLASSIFIER) +annotation class base + +base data class My + diff --git a/compiler/testData/diagnostics/tests/annotations/options/target.txt b/compiler/testData/diagnostics/tests/annotations/options/target.txt new file mode 100644 index 00000000000..c2ff25c4794 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/options/target.txt @@ -0,0 +1,16 @@ +package + +base() kotlin.data() internal final class My { + public constructor My() + public final /*synthesized*/ fun copy(): 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 + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER}) kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation { + 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 +} diff --git a/compiler/testData/diagnostics/tests/callableReference/function/abstractClassConstructors.txt b/compiler/testData/diagnostics/tests/callableReference/function/abstractClassConstructors.txt index 7461e6948ce..af982686f82 100644 --- a/compiler/testData/diagnostics/tests/callableReference/function/abstractClassConstructors.txt +++ b/compiler/testData/diagnostics/tests/callableReference/function/abstractClassConstructors.txt @@ -15,7 +15,7 @@ internal abstract class B { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class C : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class C : kotlin.Annotation { public constructor C() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.txt b/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.txt index 7b7614be495..f71ecf397f6 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.txt +++ b/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.txt @@ -29,7 +29,7 @@ internal final class Outer { internal final fun B.(): kotlin.Unit } -internal final annotation class a : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class a : kotlin.Annotation { public constructor a() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.txt b/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.txt index 45b31383fca..7ea444df8ee 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.txt +++ b/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.txt @@ -83,7 +83,7 @@ internal interface D { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal open annotation class E : kotlin.Annotation { +kotlin.annotation.annotation() internal open annotation class E : kotlin.Annotation { public constructor E() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/deparenthesize/annotatedSafeCall.txt b/compiler/testData/diagnostics/tests/deparenthesize/annotatedSafeCall.txt index a096f8c95ce..adbc1b6ce10 100644 --- a/compiler/testData/diagnostics/tests/deparenthesize/annotatedSafeCall.txt +++ b/compiler/testData/diagnostics/tests/deparenthesize/annotatedSafeCall.txt @@ -2,7 +2,7 @@ package internal fun f(/*0*/ s: kotlin.String?): kotlin.Boolean -internal final annotation class foo : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class foo : kotlin.Annotation { public constructor foo() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/deprecated/annotationUsage.txt b/compiler/testData/diagnostics/tests/deprecated/annotationUsage.txt index 2400bc23c00..b6707e92e98 100644 --- a/compiler/testData/diagnostics/tests/deprecated/annotationUsage.txt +++ b/compiler/testData/diagnostics/tests/deprecated/annotationUsage.txt @@ -14,14 +14,14 @@ obsoleteWithParam(text = "text") internal final class Obsolete2 { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -kotlin.deprecated(value = "text") internal final annotation class obsolete : kotlin.Annotation { +kotlin.deprecated(value = "text") kotlin.annotation.annotation() internal final annotation class obsolete : kotlin.Annotation { public constructor obsolete() 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.deprecated(value = "text") internal final annotation class obsoleteWithParam : kotlin.Annotation { +kotlin.deprecated(value = "text") kotlin.annotation.annotation() internal final annotation class obsoleteWithParam : kotlin.Annotation { public constructor obsoleteWithParam(/*0*/ text: kotlin.String) internal final val text: kotlin.String public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/missingNames.txt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/missingNames.txt index 0d573d1c24f..b987a4e3d20 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/missingNames.txt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/missingNames.txt @@ -32,7 +32,7 @@ internal final enum class : kotlin.Enum<> { public final /*synthesized*/ fun values(): kotlin.Array<> } -internal final annotation class : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class : kotlin.Annotation { public constructor () public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -81,7 +81,7 @@ internal final class Outer { public final /*synthesized*/ fun values(): kotlin.Array> } - internal final annotation class : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class : kotlin.Annotation { public constructor () public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/enum/modifiersOnEnumEntry.kt b/compiler/testData/diagnostics/tests/enum/modifiersOnEnumEntry.kt index 4cd63001527..2a76a527fb7 100644 --- a/compiler/testData/diagnostics/tests/enum/modifiersOnEnumEntry.kt +++ b/compiler/testData/diagnostics/tests/enum/modifiersOnEnumEntry.kt @@ -14,7 +14,7 @@ enum class E { final FINAL, inner INNER, - annotation ANNOTATION, + annotation ANNOTATION, enum ENUM, out OUT, in IN, diff --git a/compiler/testData/diagnostics/tests/enum/modifiersOnEnumEntry.txt b/compiler/testData/diagnostics/tests/enum/modifiersOnEnumEntry.txt index 37b38f2a0f9..bb2397fee56 100644 --- a/compiler/testData/diagnostics/tests/enum/modifiersOnEnumEntry.txt +++ b/compiler/testData/diagnostics/tests/enum/modifiersOnEnumEntry.txt @@ -102,6 +102,16 @@ internal final enum class E : kotlin.Enum { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + public enum entry annotation : E { + private constructor annotation() + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: E): 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 + } + public enum entry ANNOTATION : E { private constructor ANNOTATION() public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: E): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/evaluate/divisionByZero.txt b/compiler/testData/diagnostics/tests/evaluate/divisionByZero.txt index 5e7d7081d39..9f39b50c712 100644 --- a/compiler/testData/diagnostics/tests/evaluate/divisionByZero.txt +++ b/compiler/testData/diagnostics/tests/evaluate/divisionByZero.txt @@ -12,7 +12,7 @@ internal val a9: kotlin.Int internal val b1: kotlin.Byte Ann() internal val b2: kotlin.Int = 1 -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ i: kotlin.Int) internal final val i: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/functionAsExpression/Common.txt b/compiler/testData/diagnostics/tests/functionAsExpression/Common.txt index 850048ccdce..357ebb7e3e4 100644 --- a/compiler/testData/diagnostics/tests/functionAsExpression/Common.txt +++ b/compiler/testData/diagnostics/tests/functionAsExpression/Common.txt @@ -18,7 +18,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann(/*0*/ name: kotlin.String) internal final val name: kotlin.String public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/functionAsExpression/WithoutBody.txt b/compiler/testData/diagnostics/tests/functionAsExpression/WithoutBody.txt index d0260cb3578..1c4568fe3c2 100644 --- a/compiler/testData/diagnostics/tests/functionAsExpression/WithoutBody.txt +++ b/compiler/testData/diagnostics/tests/functionAsExpression/WithoutBody.txt @@ -4,7 +4,7 @@ internal val bas: () -> kotlin.Unit internal fun bar(/*0*/ a: kotlin.Any): () -> kotlin.Unit internal fun outer(): kotlin.Unit -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.txt b/compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.txt index 3da9ff2e581..b65c7f0e43c 100644 --- a/compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.txt +++ b/compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.txt @@ -13,7 +13,7 @@ internal final class Test { public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class InnerAnnotation : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class InnerAnnotation : kotlin.Annotation { public constructor InnerAnnotation() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/inner/illegalModifier.txt b/compiler/testData/diagnostics/tests/inner/illegalModifier.txt index ddfca693e0c..86141ba352e 100644 --- a/compiler/testData/diagnostics/tests/inner/illegalModifier.txt +++ b/compiler/testData/diagnostics/tests/inner/illegalModifier.txt @@ -71,7 +71,7 @@ internal final class D { public final /*synthesized*/ fun values(): kotlin.Array } - internal final annotation class S : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class S : kotlin.Annotation { public constructor S() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.txt b/compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.txt index 0ade0d0df69..bcefa1a0250 100644 --- a/compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.txt +++ b/compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.txt @@ -12,7 +12,7 @@ internal final class Test { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal final annotation class ClassObjectAnnotation : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class ClassObjectAnnotation : kotlin.Annotation { public constructor ClassObjectAnnotation() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -20,7 +20,7 @@ internal final class Test { } } - internal final annotation class NestedAnnotation : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class NestedAnnotation : kotlin.Annotation { public constructor NestedAnnotation() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt b/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt index d6c6f91412f..84ae388ed55 100644 --- a/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt +++ b/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt @@ -97,7 +97,7 @@ abstract class IllegalModifiers6() { class IllegalModifiers7() { enum inner - annotation + annotation out in vararg @@ -105,7 +105,7 @@ class IllegalModifiers7() { val x = 1 enum inner - annotation + annotation out in vararg @@ -119,7 +119,7 @@ class IllegalModifiers8 { enum open inner - annotation + annotation override out in @@ -143,7 +143,7 @@ class IllegalModifiers10 enum open inner -annotation +annotation override out in diff --git a/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.txt b/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.txt index bb0511c48c6..621e0e99aba 100644 --- a/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.txt +++ b/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.txt @@ -45,7 +45,7 @@ package illegal_modifiers { } internal final class IllegalModifiers10 { - public constructor IllegalModifiers10() + kotlin.annotation.annotation() public constructor IllegalModifiers10() 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 @@ -100,15 +100,15 @@ package illegal_modifiers { internal open class IllegalModifiers7 { public constructor IllegalModifiers7() - internal final val x: kotlin.Int = 1 + kotlin.annotation.annotation() internal final val x: kotlin.Int = 1 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - internal final fun foo(): kotlin.Unit + kotlin.annotation.annotation() internal final fun foo(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } internal final class IllegalModifiers8 { - public constructor IllegalModifiers8() + kotlin.annotation.annotation() public constructor IllegalModifiers8() public constructor IllegalModifiers8(/*0*/ x: kotlin.Int) public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -138,7 +138,7 @@ package illegal_modifiers { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class annotated : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class annotated : kotlin.Annotation { public constructor annotated(/*0*/ text: kotlin.String = ...) internal final val text: kotlin.String public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/modifiers/primaryConstructorMissingKeyword.txt b/compiler/testData/diagnostics/tests/modifiers/primaryConstructorMissingKeyword.txt index 48fa3a24d61..7a1433d4be0 100644 --- a/compiler/testData/diagnostics/tests/modifiers/primaryConstructorMissingKeyword.txt +++ b/compiler/testData/diagnostics/tests/modifiers/primaryConstructorMissingKeyword.txt @@ -17,7 +17,7 @@ internal final class A { } } -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ x: kotlin.Int = ...) internal final val x: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/recovery/namelessToplevelDeclarations.txt b/compiler/testData/diagnostics/tests/recovery/namelessToplevelDeclarations.txt index 3ab980b59b1..190218c136c 100644 --- a/compiler/testData/diagnostics/tests/recovery/namelessToplevelDeclarations.txt +++ b/compiler/testData/diagnostics/tests/recovery/namelessToplevelDeclarations.txt @@ -30,7 +30,7 @@ internal final enum class : kotlin.Enum<> { public final /*synthesized*/ fun values(): kotlin.Array<> } -internal final annotation class : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class : kotlin.Annotation { public constructor () public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/resolve/resolveAnnotatedLambdaArgument.txt b/compiler/testData/diagnostics/tests/resolve/resolveAnnotatedLambdaArgument.txt index 07a4482db96..bdd93816afd 100644 --- a/compiler/testData/diagnostics/tests/resolve/resolveAnnotatedLambdaArgument.txt +++ b/compiler/testData/diagnostics/tests/resolve/resolveAnnotatedLambdaArgument.txt @@ -3,7 +3,7 @@ package internal fun bar(/*0*/ block: (T) -> kotlin.Int): kotlin.Unit internal fun foo(): kotlin.Unit -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/ctrsAnnotationResolve.txt b/compiler/testData/diagnostics/tests/secondaryConstructors/ctrsAnnotationResolve.txt index fe82d9818f9..c6263fedc43 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/ctrsAnnotationResolve.txt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/ctrsAnnotationResolve.txt @@ -9,14 +9,14 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann1 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann1 : kotlin.Annotation { public constructor Ann1() 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 } -internal final annotation class Ann2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann2 : kotlin.Annotation { public constructor Ann2(/*0*/ x: kotlin.Int) internal final val x: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/when/AnnotatedWhenStatement.txt b/compiler/testData/diagnostics/tests/when/AnnotatedWhenStatement.txt index a1a550e49f0..6cd40599d2a 100644 --- a/compiler/testData/diagnostics/tests/when/AnnotatedWhenStatement.txt +++ b/compiler/testData/diagnostics/tests/when/AnnotatedWhenStatement.txt @@ -2,7 +2,7 @@ package internal fun foo(/*0*/ a: kotlin.Int): kotlin.Unit -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsKClass.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsKClass.txt index b6f5edd1e9b..e1031c8f225 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsKClass.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsKClass.txt @@ -2,7 +2,7 @@ package package test { - internal final annotation class AnnClass : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class AnnClass : kotlin.Annotation { public constructor AnnClass(/*0*/ a: kotlin.reflect.KClass<*>) internal final val a: kotlin.reflect.KClass<*> public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.txt index db00d009415..daf42a4580c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.txt @@ -6,7 +6,7 @@ internal val i3: kotlin.Int internal val iAnn: Ann internal fun foo(): kotlin.Int -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ i: kotlin.IntArray) internal final val i: kotlin.IntArray public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -14,7 +14,7 @@ internal final annotation class Ann : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class AnnAnn : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AnnAnn : kotlin.Annotation { public constructor AnnAnn(/*0*/ i: kotlin.Array) internal final val i: kotlin.Array public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.txt index fa1d18de8ab..daf04ac3f9c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.txt @@ -6,7 +6,7 @@ internal val ia: kotlin.IntArray internal val sa: kotlin.Array internal fun foo(): kotlin.Int -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ i: kotlin.Int) internal final val i: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -14,14 +14,14 @@ internal final annotation class Ann : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann2 : kotlin.Annotation { public constructor Ann2() 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 } -internal final annotation class AnnIA : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AnnIA : kotlin.Annotation { public constructor AnnIA(/*0*/ ia: kotlin.IntArray) internal final val ia: kotlin.IntArray public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -29,7 +29,7 @@ internal final annotation class AnnIA : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class AnnSA : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AnnSA : kotlin.Annotation { public constructor AnnSA(/*0*/ sa: kotlin.Array) internal final val sa: kotlin.Array public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/vararg.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/vararg.txt index 6e2588a7779..f56afafb342 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/vararg.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/vararg.txt @@ -6,7 +6,7 @@ internal val i3: kotlin.Int internal val iAnn: Ann internal fun foo(): kotlin.Int -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ vararg i: kotlin.Int /*kotlin.IntArray*/) internal final val i: kotlin.IntArray public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -14,7 +14,7 @@ internal final annotation class Ann : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class AnnAnn : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AnnAnn : kotlin.Annotation { public constructor AnnAnn(/*0*/ vararg i: Ann /*kotlin.Array*/) internal final val i: kotlin.Array public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/kotlinAnnotationWithVarargArgument.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/kotlinAnnotationWithVarargArgument.txt index b721ac4d876..3d6d1b39e0b 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/kotlinAnnotationWithVarargArgument.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/kotlinAnnotationWithVarargArgument.txt @@ -2,7 +2,7 @@ package B(args = {IntegerValueType(1), "b"}) internal fun test(): kotlin.Unit -internal final annotation class B : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class B : kotlin.Annotation { public constructor B(/*0*/ vararg args: kotlin.String /*kotlin.Array*/) internal final val args: kotlin.Array public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/defaultValueMustBeConstant.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/defaultValueMustBeConstant.txt index 811b3654351..a12adfd65b1 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/defaultValueMustBeConstant.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/defaultValueMustBeConstant.txt @@ -5,7 +5,7 @@ internal val nonConst: kotlin.Int internal val nonConstKClass: kotlin.reflect.KClass internal fun foo(): kotlin.Int -internal final annotation class InvalidAnn : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class InvalidAnn : kotlin.Annotation { public constructor InvalidAnn(/*0*/ p1: kotlin.Int = ..., /*1*/ p2: kotlin.Int = ..., /*2*/ p3: kotlin.reflect.KClass<*> = ...) internal final val p1: kotlin.Int internal final val p2: kotlin.Int @@ -15,7 +15,7 @@ internal final annotation class InvalidAnn : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class ValidAnn : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ValidAnn : kotlin.Annotation { public constructor ValidAnn(/*0*/ p1: kotlin.Int = ..., /*1*/ p2: kotlin.String = ..., /*2*/ p3: kotlin.reflect.KClass<*> = ..., /*3*/ p4: kotlin.IntArray = ..., /*4*/ p5: kotlin.Array = ..., /*5*/ p6: kotlin.Array> = ...) internal final val p1: kotlin.Int internal final val p2: kotlin.String diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsInVariance.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsInVariance.txt index a6765ac3675..4cd49a057d2 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsInVariance.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsInVariance.txt @@ -7,7 +7,7 @@ internal open class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann1 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann1 : kotlin.Annotation { public constructor Ann1(/*0*/ arg: kotlin.Array>) internal final val arg: kotlin.Array> public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -15,7 +15,7 @@ internal final annotation class Ann1 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann2 : kotlin.Annotation { public constructor Ann2(/*0*/ arg: kotlin.Array>) internal final val arg: kotlin.Array> public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsOutVariance.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsOutVariance.txt index c0ec82f6272..f90ae74eaea 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsOutVariance.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsOutVariance.txt @@ -7,7 +7,7 @@ internal open class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann1 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann1 : kotlin.Annotation { public constructor Ann1(/*0*/ arg: kotlin.Array>) internal final val arg: kotlin.Array> public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -15,7 +15,7 @@ internal final annotation class Ann1 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann2 : kotlin.Annotation { public constructor Ann2(/*0*/ arg: kotlin.Array>) internal final val arg: kotlin.Array> public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotation.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotation.txt index e40b008836d..91c9611a4c5 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotation.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotation.txt @@ -16,7 +16,7 @@ internal final class A2 { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann1 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann1 : kotlin.Annotation { public constructor Ann1(/*0*/ arg: kotlin.reflect.KClass<*>) internal final val arg: kotlin.reflect.KClass<*> public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -24,7 +24,7 @@ internal final annotation class Ann1 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann2 : kotlin.Annotation { public constructor Ann2(/*0*/ vararg arg: kotlin.reflect.KClass<*> /*kotlin.Array>*/) internal final val arg: kotlin.Array> public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -32,7 +32,7 @@ internal final annotation class Ann2 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann3 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann3 : kotlin.Annotation { public constructor Ann3(/*0*/ arg: kotlin.Array>) internal final val arg: kotlin.Array> public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsInVariance.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsInVariance.txt index 16b953e974c..fb014b3e4a1 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsInVariance.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsInVariance.txt @@ -7,7 +7,7 @@ internal open class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann1 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann1 : kotlin.Annotation { public constructor Ann1(/*0*/ arg: kotlin.reflect.KClass) internal final val arg: kotlin.reflect.KClass public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -15,7 +15,7 @@ internal final annotation class Ann1 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann2 : kotlin.Annotation { public constructor Ann2(/*0*/ arg: kotlin.reflect.KClass) internal final val arg: kotlin.reflect.KClass public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsOutVariance.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsOutVariance.txt index 69adfb817a3..e3f12e9d99a 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsOutVariance.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsOutVariance.txt @@ -7,7 +7,7 @@ internal open class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann1 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann1 : kotlin.Annotation { public constructor Ann1(/*0*/ arg: kotlin.reflect.KClass) internal final val arg: kotlin.reflect.KClass public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -15,7 +15,7 @@ internal final annotation class Ann1 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann2 : kotlin.Annotation { public constructor Ann2(/*0*/ arg: kotlin.reflect.KClass) internal final val arg: kotlin.reflect.KClass public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInvariantTP.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInvariantTP.txt index 4b1b1e7b528..7b2fb1b0873 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInvariantTP.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInvariantTP.txt @@ -7,7 +7,7 @@ internal open class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann1 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann1 : kotlin.Annotation { public constructor Ann1(/*0*/ arg: kotlin.reflect.KClass) internal final val arg: kotlin.reflect.KClass public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -15,7 +15,7 @@ internal final annotation class Ann1 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann2 : kotlin.Annotation { public constructor Ann2(/*0*/ arg: kotlin.reflect.KClass) internal final val arg: kotlin.reflect.KClass public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassOutArrayInAnnotationsOutVariance.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassOutArrayInAnnotationsOutVariance.txt index 57bb6dcede5..4641ce46200 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassOutArrayInAnnotationsOutVariance.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassOutArrayInAnnotationsOutVariance.txt @@ -7,7 +7,7 @@ internal open class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal final annotation class Ann1 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann1 : kotlin.Annotation { public constructor Ann1(/*0*/ arg: kotlin.Array>) internal final val arg: kotlin.Array> public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/kotlinAnnotation.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/kotlinAnnotation.txt index c655e78749f..f1a842cbadf 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/kotlinAnnotation.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/kotlinAnnotation.txt @@ -4,7 +4,7 @@ Ann(value = "a", x = IntegerValueType(1), y = 1.0.toDouble()) internal fun foo1( Ann(value = "b", x = IntegerValueType(2), y = 2.0.toDouble()) internal fun foo2(): kotlin.Unit Ann(value = "c", x = IntegerValueType(3), y = 2.0.toDouble()) internal fun foo3(): kotlin.Unit -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { public constructor Ann(/*0*/ x: kotlin.Int, /*1*/ value: kotlin.String, /*2*/ y: kotlin.Double) internal final val value: kotlin.String internal final val x: kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/qualifiedCallValue.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/qualifiedCallValue.txt index 55ed1ce17e4..a29557f9f7c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/qualifiedCallValue.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/qualifiedCallValue.txt @@ -13,7 +13,7 @@ package a { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal final annotation class IAnn : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class IAnn : kotlin.Annotation { public constructor IAnn() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -21,7 +21,7 @@ package a { } } - internal final annotation class ann1 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class ann1 : kotlin.Annotation { public constructor ann1(/*0*/ p: kotlin.deprecated = ...) internal final val p: kotlin.deprecated public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -29,7 +29,7 @@ package a { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class ann2 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class ann2 : kotlin.Annotation { public constructor ann2(/*0*/ p: a.b.c.ann1 = ...) internal final val p: a.b.c.ann1 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -37,7 +37,7 @@ package a { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class ann3 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class ann3 : kotlin.Annotation { public constructor ann3(/*0*/ p: a.b.c.A.IAnn = ..., /*1*/ p2: a.b.c.A.IAnn = ...) internal final val p: a.b.c.A.IAnn internal final val p2: a.b.c.A.IAnn @@ -46,7 +46,7 @@ package a { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal final annotation class annArray : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class annArray : kotlin.Annotation { public constructor annArray(/*0*/ p: kotlin.Array = ...) internal final val p: kotlin.Array public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.txt b/compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.txt index d1caf03972e..dc0aeab2ec7 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.txt @@ -1,5 +1,5 @@ package test -test.AnnotatedAnnotation() public final annotation class AnnotatedAnnotation : kotlin.Annotation { +test.AnnotatedAnnotation() kotlin.annotation.annotation() public final annotation class AnnotatedAnnotation : kotlin.Annotation { /*primary*/ public constructor AnnotatedAnnotation() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.txt b/compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.txt index bf8bb667d3b..9f7d03729aa 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.txt @@ -22,13 +22,13 @@ internal final enum class E : kotlin.Enum { public final /*synthesized*/ fun values(): kotlin.Array } -internal final annotation class EnumOption : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class EnumOption : kotlin.Annotation { /*primary*/ public constructor EnumOption(/*0*/ option: test.E) internal final val option: test.E internal final fun (): test.E } -internal final annotation class OptionGroups : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class OptionGroups : kotlin.Annotation { /*primary*/ public constructor OptionGroups(/*0*/ o1: test.StringOptions, /*1*/ o2: test.EnumOption) internal final val o1: test.StringOptions internal final fun (): test.StringOptions @@ -36,7 +36,7 @@ internal final annotation class OptionGroups : kotlin.Annotation { internal final fun (): test.EnumOption } -internal final annotation class StringOptions : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class StringOptions : kotlin.Annotation { /*primary*/ public constructor StringOptions(/*0*/ vararg option: kotlin.String /*kotlin.Array*/) internal final val option: kotlin.Array internal final fun (): kotlin.Array diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.txt b/compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.txt index 74a4ece988e..0356b39bc5a 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.txt @@ -18,7 +18,7 @@ internal final enum class E : kotlin.Enum { public final /*synthesized*/ fun values(): kotlin.Array } -internal final annotation class EnumAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class EnumAnno : kotlin.Annotation { /*primary*/ public constructor EnumAnno(/*0*/ value: test.E) internal final val value: test.E internal final fun (): test.E @@ -29,7 +29,7 @@ public final class EnumArgumentWithCustomToString { test.EnumAnno(value = E.CAKE) test.EnumArrayAnno(value = {E.CAKE, E.CAKE}) internal final fun annotated(): kotlin.Unit } -internal final annotation class EnumArrayAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class EnumArrayAnno : kotlin.Annotation { /*primary*/ public constructor EnumArrayAnno(/*0*/ vararg value: test.E /*kotlin.Array*/) internal final val value: kotlin.Array internal final fun (): kotlin.Array diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.txt b/compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.txt index 457fe635eee..51117cc7663 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno(/*0*/ s: kotlin.String) internal final val s: kotlin.String internal final fun (): kotlin.String diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.txt b/compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.txt index 99a705e74ff..5e6cfce6549 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.txt @@ -1,5 +1,5 @@ package test -public final annotation class SimpleAnnotation : kotlin.Annotation { +kotlin.annotation.annotation() public final annotation class SimpleAnnotation : kotlin.Annotation { /*primary*/ public constructor SimpleAnnotation() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.txt index c253b8d5a4d..f11f12849ca 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.txt index 7632f8e8dc0..8af7dfcdf44 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno(/*0*/ value: kotlin.String) internal final val value: kotlin.String internal final fun (): kotlin.String diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.txt index d269b2347a0..9d09f00cdb8 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.txt index c8637c254e2..22c826ecca4 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno(/*0*/ t: java.lang.annotation.ElementType) internal final val t: java.lang.annotation.ElementType internal final fun (): java.lang.annotation.ElementType diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.txt index 35b8b67f0ff..b52d3b3dea7 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.txt index 8dc529d4f7d..232718e6ad8 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.txt index 6f98192e1e6..221a25a0db3 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.txt index c3ead292592..c3c12f29f73 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.txt index 29a6baac275..a3aff97886e 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.txt @@ -6,14 +6,14 @@ internal final class A { public companion object Companion { /*primary*/ private constructor Companion() - internal final annotation class Anno1 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class Anno1 : kotlin.Annotation { /*primary*/ public constructor Anno1() } internal final class B { /*primary*/ public constructor B() - internal final annotation class Anno2 : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class Anno2 : kotlin.Annotation { /*primary*/ public constructor Anno2() } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.txt index ca4816dab10..37fb81b01bc 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.txt index ea76204d029..3f0a7c24240 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.txt index 92194a689e2..59992e8e4c3 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.txt @@ -1,6 +1,6 @@ package test -internal final annotation class `$$$$$$` : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class `$$$$$$` : kotlin.Annotation { /*primary*/ public constructor `$$$$$$`() } @@ -8,7 +8,7 @@ test.`$$$$$$`() internal final class A { /*primary*/ public constructor A() } -internal final annotation class `Anno$tation` : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class `Anno$tation` : kotlin.Annotation { /*primary*/ public constructor `Anno$tation`() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.txt index 3c830300993..c592d495c9e 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno(/*0*/ t: java.lang.annotation.ElementType) internal final val t: java.lang.annotation.ElementType internal final fun (): java.lang.annotation.ElementType diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.txt index 7fc605e1161..ae9de1d4caf 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.txt @@ -1,14 +1,14 @@ package test -internal final annotation class A1 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A1 : kotlin.Annotation { /*primary*/ public constructor A1() } -internal final annotation class A2 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A2 : kotlin.Annotation { /*primary*/ public constructor A2() } -internal final annotation class A3 : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A3 : kotlin.Annotation { /*primary*/ public constructor A3() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.txt index 45e5bdac392..d6e2929cf91 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.txt @@ -3,7 +3,7 @@ package test internal final class A { /*primary*/ public constructor A() - internal final annotation class Anno : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.txt index cf073499c7d..2b142756a49 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.txt index 6ff485396f2..5b62bb55b8f 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.txt @@ -1,5 +1,5 @@ package test -java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME) internal final annotation class Anno : kotlin.Annotation { +java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME) kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.txt index 5172f44f966..ea52afc4b87 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.txt index c0287d9def2..02cded471d1 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.txt @@ -1,18 +1,18 @@ package test -internal final annotation class BooleanAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class BooleanAnno : kotlin.Annotation { /*primary*/ public constructor BooleanAnno(/*0*/ value: kotlin.Boolean) internal final val value: kotlin.Boolean internal final fun (): kotlin.Boolean } -internal final annotation class ByteAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ByteAnno : kotlin.Annotation { /*primary*/ public constructor ByteAnno(/*0*/ value: kotlin.Byte) internal final val value: kotlin.Byte internal final fun (): kotlin.Byte } -internal final annotation class CharAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class CharAnno : kotlin.Annotation { /*primary*/ public constructor CharAnno(/*0*/ value: kotlin.Char) internal final val value: kotlin.Char internal final fun (): kotlin.Char @@ -22,31 +22,31 @@ test.IntAnno(value = 42) test.ShortAnno(value = 42.toShort()) test.ByteAnno(valu /*primary*/ public constructor Class() } -internal final annotation class DoubleAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class DoubleAnno : kotlin.Annotation { /*primary*/ public constructor DoubleAnno(/*0*/ value: kotlin.Double) internal final val value: kotlin.Double internal final fun (): kotlin.Double } -internal final annotation class FloatAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class FloatAnno : kotlin.Annotation { /*primary*/ public constructor FloatAnno(/*0*/ value: kotlin.Float) internal final val value: kotlin.Float internal final fun (): kotlin.Float } -internal final annotation class IntAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class IntAnno : kotlin.Annotation { /*primary*/ public constructor IntAnno(/*0*/ value: kotlin.Int) internal final val value: kotlin.Int internal final fun (): kotlin.Int } -internal final annotation class LongAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class LongAnno : kotlin.Annotation { /*primary*/ public constructor LongAnno(/*0*/ value: kotlin.Long) internal final val value: kotlin.Long internal final fun (): kotlin.Long } -internal final annotation class ShortAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ShortAnno : kotlin.Annotation { /*primary*/ public constructor ShortAnno(/*0*/ value: kotlin.Short) internal final val value: kotlin.Short internal final fun (): kotlin.Short diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.txt index 8c56ddfb41d..94ef8eda087 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno(/*0*/ int: kotlin.Int, /*1*/ string: kotlin.String, /*2*/ double: kotlin.Double) internal final val double: kotlin.Double internal final fun (): kotlin.Double diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.txt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.txt index 33cfe343b75..352a71cacdc 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.txt @@ -3,6 +3,6 @@ package test test.Anno() internal val x: kotlin.Int internal fun (): kotlin.Int -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.txt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.txt index 0aff1f871e6..d17b6d8782b 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.txt @@ -4,7 +4,7 @@ test.Anno(t = ElementType.FIELD) internal val bar: kotlin.Int = 42 internal fun (): kotlin.Int test.Anno(t = ElementType.METHOD) internal fun foo(): kotlin.Unit -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno(/*0*/ t: java.lang.annotation.ElementType) internal final val t: java.lang.annotation.ElementType internal final fun (): java.lang.annotation.ElementType diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.txt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.txt index 9039fb35eda..855c2ffc454 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.txt @@ -5,7 +5,7 @@ test.Anno(t = {ElementType.PACKAGE}) internal val bar: kotlin.Int = 42 test.Anno(t = {}) internal fun baz(): kotlin.Unit test.Anno(t = {ElementType.METHOD, ElementType.FIELD}) internal fun foo(): kotlin.Unit -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno(/*0*/ vararg t: java.lang.annotation.ElementType /*kotlin.Array*/) internal final val t: kotlin.Array internal final fun (): kotlin.Array diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.txt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.txt index 4783daf41d6..585aaee7bf4 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.txt @@ -2,6 +2,6 @@ package test test.Anno() internal fun function(): kotlin.Unit -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.txt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.txt index f39ae47fe92..31f46a51f2e 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.txt @@ -3,6 +3,6 @@ package test internal val property: kotlin.Int test.Anno() internal fun (): kotlin.Int -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.txt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.txt index 31c1b1fdf12..8e0a02fa96e 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.txt @@ -4,6 +4,6 @@ test.Anno() internal var property: kotlin.Int internal fun (): kotlin.Int internal fun (/*0*/ : kotlin.Int): kotlin.Unit -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.txt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.txt index 22bb8faa2dd..04fb642e419 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.txt @@ -4,6 +4,6 @@ internal var property: kotlin.Int internal fun (): kotlin.Int test.Anno() internal fun (/*0*/ value: kotlin.Int): kotlin.Unit -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.txt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.txt index b0b4765b8bf..8974c0fc9b3 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.txt @@ -5,7 +5,7 @@ test.Anno(t = {"prosper"}) internal val bar: kotlin.Int = 42 test.Anno(t = {}) internal fun baz(): kotlin.Unit test.Anno(t = {"live", "long"}) internal fun foo(): kotlin.Unit -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno(/*0*/ vararg t: kotlin.String /*kotlin.Array*/) internal final val t: kotlin.Array internal final fun (): kotlin.Array diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.txt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.txt index be17a96e471..6b27388be55 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.txt @@ -1,10 +1,10 @@ package test -internal final annotation class A : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A : kotlin.Annotation { /*primary*/ public constructor A() } -internal final annotation class B : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class B : kotlin.Annotation { /*primary*/ public constructor B() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.txt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.txt index 01a39ef6bb0..3b4ec2434af 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.txt @@ -1,10 +1,10 @@ package test -internal final annotation class A : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A : kotlin.Annotation { /*primary*/ public constructor A() } -internal final annotation class B : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class B : kotlin.Annotation { /*primary*/ public constructor B() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.txt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.txt index 7b1b075ce94..d09853c0ddc 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.txt @@ -2,6 +2,6 @@ package test internal fun kotlin.Int.foo(/*0*/ test.A() x: kotlin.Int): kotlin.Unit -internal final annotation class A : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A : kotlin.Annotation { /*primary*/ public constructor A() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.txt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.txt index 073b165297f..4f23c527fcd 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.txt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.txt index a071d5ecd84..5dcbed29e07 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.txt @@ -1,6 +1,6 @@ package test -internal final annotation class A : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A : kotlin.Annotation { /*primary*/ public constructor A() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.txt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.txt index 6f983d509e5..236a876ec32 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.txt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.txt index 5c9f78e5745..70e5a27be90 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.txt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.txt index d1546823bc5..1a929ba986c 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.txt @@ -1,6 +1,6 @@ package test -internal final annotation class A : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A : kotlin.Annotation { /*primary*/ public constructor A(/*0*/ s: kotlin.String) internal final val s: kotlin.String internal final fun (): kotlin.String diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.txt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.txt index fecebf555ba..8a7ca50d4eb 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.txt @@ -3,18 +3,18 @@ package test internal fun bar(/*0*/ test.A() test.B() test.C() test.D() x: kotlin.Int): kotlin.Unit internal fun foo(/*0*/ test.A() test.B() x: kotlin.Int, /*1*/ test.A() test.C() y: kotlin.Double, /*2*/ test.B() test.C() test.D() z: kotlin.String): kotlin.Unit -internal final annotation class A : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A : kotlin.Annotation { /*primary*/ public constructor A() } -internal final annotation class B : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class B : kotlin.Annotation { /*primary*/ public constructor B() } -internal final annotation class C : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class C : kotlin.Annotation { /*primary*/ public constructor C() } -internal final annotation class D : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class D : kotlin.Annotation { /*primary*/ public constructor D() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.txt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.txt index 7cf6937db80..144beb4d129 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.txt @@ -1,6 +1,6 @@ package test -internal final annotation class A : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A : kotlin.Annotation { /*primary*/ public constructor A() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.txt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.txt index eda01e83b37..c2891374258 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.txt @@ -2,6 +2,6 @@ package test internal fun foo(/*0*/ test.Anno() x: kotlin.Int): kotlin.Unit -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.txt b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.txt index 0ec4bce6951..e71ccf19f0e 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.txt @@ -4,10 +4,10 @@ internal var foo: kotlin.Int internal fun (): kotlin.Int internal fun (/*0*/ test.A() test.B() value: kotlin.Int): kotlin.Unit -internal final annotation class A : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A : kotlin.Annotation { /*primary*/ public constructor A() } -internal final annotation class B : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class B : kotlin.Annotation { /*primary*/ public constructor B() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.txt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.txt index af76793d7b7..f5102295613 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.txt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.txt index 5b093257651..d5293e678f4 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.txt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.txt index 198c49875e9..d628a915d32 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.txt @@ -10,14 +10,14 @@ internal final class Class { internal final fun kotlin.String.(): kotlin.String } -internal final annotation class DoubleAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class DoubleAnno : kotlin.Annotation { /*primary*/ public constructor DoubleAnno() } -internal final annotation class IntAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class IntAnno : kotlin.Annotation { /*primary*/ public constructor IntAnno() } -internal final annotation class StringAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class StringAnno : kotlin.Annotation { /*primary*/ public constructor StringAnno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.txt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.txt index 1d022c66ed8..617bfcd67a2 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.txt @@ -7,14 +7,14 @@ test.IntAnno() internal val kotlin.Int.extension: kotlin.Int test.StringAnno() internal val kotlin.String.extension: kotlin.String internal fun kotlin.String.(): kotlin.String -internal final annotation class DoubleAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class DoubleAnno : kotlin.Annotation { /*primary*/ public constructor DoubleAnno() } -internal final annotation class IntAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class IntAnno : kotlin.Annotation { /*primary*/ public constructor IntAnno() } -internal final annotation class StringAnno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class StringAnno : kotlin.Annotation { /*primary*/ public constructor StringAnno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.txt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.txt index c5983f0ac0f..5c060817c2e 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.txt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.txt index 0da708e5673..dcd9b1875eb 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.txt @@ -3,6 +3,6 @@ package test test.Anno() internal val property: kotlin.Int internal fun (): kotlin.Int -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.txt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.txt index d4e5d39b108..cc0f7717db0 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.txt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.txt index 02901516852..9ad34b16d1a 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Anno : kotlin.Annotation { /*primary*/ public constructor Anno() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.txt b/compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.txt index 821362e88fa..47190d4e0e4 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.txt @@ -2,6 +2,6 @@ package test internal fun @[test.A()] kotlin.String.foo(): kotlin.Unit -internal final annotation class A : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A : kotlin.Annotation { /*primary*/ public constructor A() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.txt b/compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.txt index 2e19340c417..6083e5af9d5 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.txt @@ -1,6 +1,6 @@ package test -internal final annotation class A : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A : kotlin.Annotation { /*primary*/ public constructor A() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.txt b/compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.txt index c19b9bbc9fc..81a5e323a3b 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.txt @@ -1,6 +1,6 @@ package test -internal final annotation class A : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A : kotlin.Annotation { /*primary*/ public constructor A() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.txt b/compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.txt index 5e6e5a4658c..c919d0e0304 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.txt @@ -1,6 +1,6 @@ package test -internal final annotation class Ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation { /*primary*/ public constructor Ann(/*0*/ x: kotlin.String, /*1*/ y: kotlin.Double) internal final val x: kotlin.String internal final fun (): kotlin.String diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.txt index a9f8f7f5278..78c5da4693d 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.txt @@ -6,7 +6,7 @@ internal final class Some { test.Some.Companion.TestAnnotation() public companion object Companion { /*primary*/ private constructor Companion() - internal final annotation class TestAnnotation : kotlin.Annotation { + kotlin.annotation.annotation() internal final annotation class TestAnnotation : kotlin.Annotation { /*primary*/ public constructor TestAnnotation() } } diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.txt b/compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.txt index c35cd5a3556..a44a114910e 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.txt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.txt @@ -5,7 +5,7 @@ test.A(s = "2") internal var v: kotlin.Int kotlin.platform.platformName(name = "vset") test.A(s = "4") internal fun (/*0*/ : kotlin.Int): kotlin.Unit kotlin.platform.platformName(name = "bar") test.A(s = "1") internal fun foo(): kotlin.String -internal final annotation class A : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class A : kotlin.Annotation { /*primary*/ public constructor A(/*0*/ s: kotlin.String) internal final val s: kotlin.String internal final fun (): kotlin.String diff --git a/compiler/testData/psi/SimpleModifiers.txt b/compiler/testData/psi/SimpleModifiers.txt index 24d0a897668..4f12a5390f4 100644 --- a/compiler/testData/psi/SimpleModifiers.txt +++ b/compiler/testData/psi/SimpleModifiers.txt @@ -25,7 +25,12 @@ JetFile: SimpleModifiers.kt PsiWhiteSpace('\n') PsiElement(open)('open') PsiWhiteSpace('\n') - PsiElement(annotation)('annotation') + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') PsiWhiteSpace('\n') PsiElement(override)('override') PsiWhiteSpace('\n') @@ -67,7 +72,12 @@ JetFile: SimpleModifiers.kt PsiWhiteSpace('\n ') PsiElement(open)('open') PsiWhiteSpace('\n ') - PsiElement(annotation)('annotation') + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') PsiWhiteSpace('\n ') PsiElement(override)('override') PsiWhiteSpace('\n ') diff --git a/compiler/testData/psi/SoftKeywords.txt b/compiler/testData/psi/SoftKeywords.txt index 9a8f32e1a1e..b99c8b8983e 100644 --- a/compiler/testData/psi/SoftKeywords.txt +++ b/compiler/testData/psi/SoftKeywords.txt @@ -38,7 +38,12 @@ JetFile: SoftKeywords.kt PsiWhiteSpace('\n') PsiElement(open)('open') PsiWhiteSpace('\n') - PsiElement(annotation)('annotation') + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') PsiWhiteSpace('\n') PsiElement(override)('override') PsiWhiteSpace('\n') @@ -113,7 +118,12 @@ JetFile: SoftKeywords.kt PsiWhiteSpace('\n ') PsiElement(open)('open') PsiWhiteSpace('\n ') - PsiElement(annotation)('annotation') + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') PsiWhiteSpace('\n ') PsiElement(override)('override') PsiWhiteSpace('\n ') @@ -972,7 +982,12 @@ JetFile: SoftKeywords.kt PsiWhiteSpace('\n ') PsiElement(open)('open') PsiWhiteSpace('\n ') - PsiElement(annotation)('annotation') + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') PsiWhiteSpace('\n ') PsiElement(override)('override') PsiWhiteSpace('\n ') @@ -1292,7 +1307,12 @@ JetFile: SoftKeywords.kt PsiWhiteSpace('\n ') PsiElement(open)('open') PsiWhiteSpace('\n ') - PsiElement(annotation)('annotation') + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') PsiWhiteSpace('\n ') PsiElement(override)('override') PsiWhiteSpace('\n ') diff --git a/compiler/testData/psi/annotation/Annotations.txt b/compiler/testData/psi/annotation/Annotations.txt index 4113551639f..863e9201d08 100644 --- a/compiler/testData/psi/annotation/Annotations.txt +++ b/compiler/testData/psi/annotation/Annotations.txt @@ -25,7 +25,12 @@ JetFile: Annotations.kt PsiWhiteSpace('\n') PsiElement(open)('open') PsiWhiteSpace('\n') - PsiElement(annotation)('annotation') + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') PsiWhiteSpace('\n') PsiElement(override)('override') PsiWhiteSpace('\n') @@ -266,7 +271,12 @@ JetFile: Annotations.kt PsiWhiteSpace('\n') PsiElement(open)('open') PsiWhiteSpace('\n') - PsiElement(annotation)('annotation') + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') PsiWhiteSpace('\n') PsiElement(override)('override') PsiWhiteSpace('\n') diff --git a/compiler/testData/psi/annotation/Annotations_ERR.txt b/compiler/testData/psi/annotation/Annotations_ERR.txt index 80389fcc24d..48b229fc3e5 100644 --- a/compiler/testData/psi/annotation/Annotations_ERR.txt +++ b/compiler/testData/psi/annotation/Annotations_ERR.txt @@ -25,7 +25,12 @@ JetFile: Annotations_ERR.kt PsiWhiteSpace('\n') PsiElement(open)('open') PsiWhiteSpace('\n') - PsiElement(annotation)('annotation') + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') PsiWhiteSpace('\n') PsiElement(override)('override') PsiWhiteSpace('\n') @@ -221,7 +226,12 @@ JetFile: Annotations_ERR.kt PsiWhiteSpace('\n') PsiElement(open)('open') PsiWhiteSpace('\n') - PsiElement(annotation)('annotation') + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') PsiWhiteSpace('\n') PsiElement(override)('override') PsiWhiteSpace('\n') diff --git a/compiler/testData/psi/annotation/onFile/withoutFileAnnotationAndPackageDeclaration.txt b/compiler/testData/psi/annotation/onFile/withoutFileAnnotationAndPackageDeclaration.txt index 6f56c7d133a..5ff571a1866 100644 --- a/compiler/testData/psi/annotation/onFile/withoutFileAnnotationAndPackageDeclaration.txt +++ b/compiler/testData/psi/annotation/onFile/withoutFileAnnotationAndPackageDeclaration.txt @@ -35,7 +35,12 @@ JetFile: withoutFileAnnotationAndPackageDeclaration.kt PsiWhiteSpace('\n\n') CLASS MODIFIER_LIST - PsiElement(annotation)('annotation') + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') PsiWhiteSpace(' ') PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/annotation/options/annotAsArgComplex.kt b/compiler/testData/psi/annotation/options/annotAsArgComplex.kt new file mode 100644 index 00000000000..87da177827e --- /dev/null +++ b/compiler/testData/psi/annotation/options/annotAsArgComplex.kt @@ -0,0 +1,9 @@ +class Annotation { + fun setProblemGroup() {} + fun getQuickFixes() = 0 +} + +fun registerQuickFix(annot: Annotation) { + annot.setProblemGroup() + val fixes = annot.getQuickFixes() +} diff --git a/compiler/testData/psi/annotation/options/annotAsArgComplex.txt b/compiler/testData/psi/annotation/options/annotAsArgComplex.txt new file mode 100644 index 00000000000..ac790f3733a --- /dev/null +++ b/compiler/testData/psi/annotation/options/annotAsArgComplex.txt @@ -0,0 +1,89 @@ +JetFile: annotAsArgComplex.kt + PACKAGE_DIRECTIVE + + IMPORT_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)('}') \ No newline at end of file diff --git a/compiler/testData/psi/annotation/options/annotation.kt b/compiler/testData/psi/annotation/options/annotation.kt new file mode 100644 index 00000000000..05e089a8935 --- /dev/null +++ b/compiler/testData/psi/annotation/options/annotation.kt @@ -0,0 +1,20 @@ +// 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 +) diff --git a/compiler/testData/psi/annotation/options/annotation.txt b/compiler/testData/psi/annotation/options/annotation.txt new file mode 100644 index 00000000000..f1df48cc47f --- /dev/null +++ b/compiler/testData/psi/annotation/options/annotation.txt @@ -0,0 +1,188 @@ +JetFile: annotation.kt + PACKAGE_DIRECTIVE + + IMPORT_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)(')') \ No newline at end of file diff --git a/compiler/testData/psi/annotation/options/annotationAsArg.kt b/compiler/testData/psi/annotation/options/annotationAsArg.kt new file mode 100644 index 00000000000..5484366eef0 --- /dev/null +++ b/compiler/testData/psi/annotation/options/annotationAsArg.kt @@ -0,0 +1,14 @@ +class Annotation(val x: Int) { + fun baz() {} + fun bar() = x +} + +fun foo(annotation: Annotation): Int { + if (annotation.bar() == 0) { + annotation.baz() + return 0 + } + else { + return -1 + } +} diff --git a/compiler/testData/psi/annotation/options/annotationAsArg.txt b/compiler/testData/psi/annotation/options/annotationAsArg.txt new file mode 100644 index 00000000000..4a9e7c9ab32 --- /dev/null +++ b/compiler/testData/psi/annotation/options/annotationAsArg.txt @@ -0,0 +1,144 @@ +JetFile: annotationAsArg.kt + PACKAGE_DIRECTIVE + + IMPORT_LIST + + CLASS + PsiElement(class)('class') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('Annotation') + PRIMARY_CONSTRUCTOR + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + VALUE_PARAMETER + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('x') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Int') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + FUN + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('baz') + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n ') + FUN + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('bar') + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace('\n') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n') + FUN + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('foo') + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + VALUE_PARAMETER + PsiElement(IDENTIFIER)('annotation') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Annotation') + PsiElement(RPAR)(')') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Int') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + BINARY_EXPRESSION + DOT_QUALIFIED_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') + PsiElement(DOT)('.') + CALL_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') + PsiWhiteSpace(' ') + INTEGER_CONSTANT + PsiElement(INTEGER_LITERAL)('0') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + THEN + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + DOT_QUALIFIED_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') + PsiElement(DOT)('.') + CALL_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('baz') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + RETURN + PsiElement(return)('return') + PsiWhiteSpace(' ') + INTEGER_CONSTANT + PsiElement(INTEGER_LITERAL)('0') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n ') + PsiElement(else)('else') + PsiWhiteSpace(' ') + ELSE + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + RETURN + PsiElement(return)('return') + PsiWhiteSpace(' ') + PREFIX_EXPRESSION + OPERATION_REFERENCE + PsiElement(MINUS)('-') + INTEGER_CONSTANT + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n') + PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/testData/psi/annotation/options/annotationAsArgComplex.kt b/compiler/testData/psi/annotation/options/annotationAsArgComplex.kt new file mode 100644 index 00000000000..2f8aa3161d0 --- /dev/null +++ b/compiler/testData/psi/annotation/options/annotationAsArgComplex.kt @@ -0,0 +1,9 @@ +class Annotation { + fun setProblemGroup() {} + fun getQuickFixes() = 0 +} + +fun registerQuickFix(annotation: Annotation) { + annotation.setProblemGroup() + val fixes = annotation.getQuickFixes() +} diff --git a/compiler/testData/psi/annotation/options/annotationAsArgComplex.txt b/compiler/testData/psi/annotation/options/annotationAsArgComplex.txt new file mode 100644 index 00000000000..6000806b13d --- /dev/null +++ b/compiler/testData/psi/annotation/options/annotationAsArgComplex.txt @@ -0,0 +1,89 @@ +JetFile: annotationAsArgComplex.kt + PACKAGE_DIRECTIVE + + IMPORT_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)('annotation') + 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)('annotation') + 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)('annotation') + PsiElement(DOT)('.') + CALL_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('getQuickFixes') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n') + PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/testData/psi/annotation/options/java.kt b/compiler/testData/psi/annotation/options/java.kt new file mode 100644 index 00000000000..64d86b337ca --- /dev/null +++ b/compiler/testData/psi/annotation/options/java.kt @@ -0,0 +1,10 @@ +import java.lang.annotation.* + +annotation +@java.lang.annotation.Retention(RetentionPolicy.CLASS) +class my + +annotation +Retention(RetentionPolicy.RUNTIME) +Target(ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR) +class my1 diff --git a/compiler/testData/psi/annotation/options/java.txt b/compiler/testData/psi/annotation/options/java.txt new file mode 100644 index 00000000000..7609d622a01 --- /dev/null +++ b/compiler/testData/psi/annotation/options/java.txt @@ -0,0 +1,118 @@ +JetFile: java.kt + PACKAGE_DIRECTIVE + + IMPORT_LIST + IMPORT_DIRECTIVE + PsiElement(import)('import') + PsiWhiteSpace(' ') + DOT_QUALIFIED_EXPRESSION + DOT_QUALIFIED_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('java') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('lang') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') + PsiElement(DOT)('.') + PsiElement(MUL)('*') + PsiWhiteSpace('\n\n') + CLASS + MODIFIER_LIST + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') + PsiWhiteSpace(' \n') + ANNOTATION_ENTRY + PsiElement(AT)('@') + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + USER_TYPE + USER_TYPE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('java') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('lang') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Retention') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + DOT_QUALIFIED_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('RetentionPolicy') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('CLASS') + PsiElement(RPAR)(')') + PsiWhiteSpace(' \n') + PsiElement(class)('class') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('my') + PsiWhiteSpace('\n\n') + CLASS + MODIFIER_LIST + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') + PsiWhiteSpace(' \n') + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Retention') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + DOT_QUALIFIED_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('RetentionPolicy') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('RUNTIME') + PsiElement(RPAR)(')') + PsiWhiteSpace(' \n') + 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)('ElementType') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('ANNOTATION_TYPE') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + VALUE_ARGUMENT + DOT_QUALIFIED_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('ElementType') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('CONSTRUCTOR') + PsiElement(RPAR)(')') + PsiWhiteSpace(' \n') + PsiElement(class)('class') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('my1') \ No newline at end of file diff --git a/compiler/testData/psi/annotation/options/local.kt b/compiler/testData/psi/annotation/options/local.kt new file mode 100644 index 00000000000..21c6e0b4629 --- /dev/null +++ b/compiler/testData/psi/annotation/options/local.kt @@ -0,0 +1,5 @@ +fun foo(): Int { + @annotation class Ann + @Ann val x = 1 + return x +} \ No newline at end of file diff --git a/compiler/testData/psi/annotation/options/local.txt b/compiler/testData/psi/annotation/options/local.txt new file mode 100644 index 00000000000..9a25e12b7be --- /dev/null +++ b/compiler/testData/psi/annotation/options/local.txt @@ -0,0 +1,62 @@ +JetFile: local.kt + PACKAGE_DIRECTIVE + + IMPORT_LIST + + FUN + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('foo') + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Int') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + CLASS + MODIFIER_LIST + ANNOTATION_ENTRY + PsiElement(AT)('@') + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('annotation') + PsiWhiteSpace(' ') + PsiElement(class)('class') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('Ann') + PsiWhiteSpace('\n ') + PROPERTY + MODIFIER_LIST + ANNOTATION_ENTRY + PsiElement(AT)('@') + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Ann') + PsiWhiteSpace(' ') + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + INTEGER_CONSTANT + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace('\n ') + RETURN + PsiElement(return)('return') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace('\n') + PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/testData/psi/annotation/options/options.kt b/compiler/testData/psi/annotation/options/options.kt new file mode 100644 index 00000000000..f51b6127ec7 --- /dev/null +++ b/compiler/testData/psi/annotation/options/options.kt @@ -0,0 +1,12 @@ +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 \ No newline at end of file diff --git a/compiler/testData/psi/annotation/options/options.txt b/compiler/testData/psi/annotation/options/options.txt new file mode 100644 index 00000000000..0352a3b4644 --- /dev/null +++ b/compiler/testData/psi/annotation/options/options.txt @@ -0,0 +1,173 @@ +JetFile: options.kt + PACKAGE_DIRECTIVE + + IMPORT_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 + 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') \ No newline at end of file diff --git a/compiler/testData/renderer/Classes.kt b/compiler/testData/renderer/Classes.kt index 31df8ff1a43..9a6b220b470 100644 --- a/compiler/testData/renderer/Classes.kt +++ b/compiler/testData/renderer/Classes.kt @@ -35,9 +35,9 @@ public class WithReified public interface TwoUpperBounds where T : Number, T : Any //package rendererTest -//internal final annotation class TheAnnotation : kotlin.Annotation defined in rendererTest +//kotlin.annotation.annotation internal final annotation class TheAnnotation : kotlin.Annotation defined in rendererTest //public constructor TheAnnotation() defined in rendererTest.TheAnnotation -//internal final annotation class AnotherAnnotation : kotlin.Annotation defined in rendererTest +//kotlin.annotation.annotation internal final annotation class AnotherAnnotation : kotlin.Annotation defined in rendererTest //public constructor AnotherAnnotation() defined in rendererTest.AnotherAnnotation //rendererTest.TheAnnotation public open class TheClass defined in rendererTest // defined in rendererTest.TheClass diff --git a/compiler/testData/renderer/KeywordsInNames.kt b/compiler/testData/renderer/KeywordsInNames.kt index 1c92b06d8f7..cfd65f664f8 100644 --- a/compiler/testData/renderer/KeywordsInNames.kt +++ b/compiler/testData/renderer/KeywordsInNames.kt @@ -17,7 +17,7 @@ val AS_SAFE = 1 val NOT_IN = 2 val NOT_IS = 3 -//internal final annotation class `true` : kotlin.Annotation defined in root package +//kotlin.annotation.annotation internal final annotation class `true` : kotlin.Annotation defined in root package //public constructor `true`() defined in `true` //internal val `val`: kotlin.Int defined in root package //`true` internal interface `interface` defined in root package diff --git a/compiler/testData/serialization/builtinsSerializer/annotationArguments/annotation.txt b/compiler/testData/serialization/builtinsSerializer/annotationArguments/annotation.txt index 406e0750e80..6f95aea08e2 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationArguments/annotation.txt +++ b/compiler/testData/serialization/builtinsSerializer/annotationArguments/annotation.txt @@ -1,6 +1,6 @@ package test -internal final annotation class AnnotationArray : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class AnnotationArray : kotlin.Annotation { public constructor AnnotationArray(/*0*/ annotationArray: kotlin.Array) internal final val annotationArray: kotlin.Array } @@ -13,11 +13,11 @@ test.AnnotationArray(annotationArray = {test.JustAnnotation(annotation = test.Em public constructor C2() } -internal final annotation class Empty : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Empty : kotlin.Annotation { public constructor Empty() } -internal final annotation class JustAnnotation : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class JustAnnotation : kotlin.Annotation { public constructor JustAnnotation(/*0*/ annotation: test.Empty) internal final val annotation: test.Empty } diff --git a/compiler/testData/serialization/builtinsSerializer/annotationArguments/enum.txt b/compiler/testData/serialization/builtinsSerializer/annotationArguments/enum.txt index 11a76ebc119..f01734d10e8 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationArguments/enum.txt +++ b/compiler/testData/serialization/builtinsSerializer/annotationArguments/enum.txt @@ -8,12 +8,12 @@ test.EnumArray(enumArray = {Weapon.PAPER, Weapon.ROCK}) internal final class C2 public constructor C2() } -internal final annotation class EnumArray : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class EnumArray : kotlin.Annotation { public constructor EnumArray(/*0*/ enumArray: kotlin.Array) internal final val enumArray: kotlin.Array } -internal final annotation class JustEnum : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class JustEnum : kotlin.Annotation { public constructor JustEnum(/*0*/ weapon: test.Weapon) internal final val weapon: test.Weapon } diff --git a/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitiveArrays.txt b/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitiveArrays.txt index d21aca61ed4..f5c7253a19d 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitiveArrays.txt +++ b/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitiveArrays.txt @@ -8,7 +8,7 @@ test.PrimitiveArrays(booleanArray = {}, byteArray = {}, charArray = {}, doubleAr public constructor C2() } -internal final annotation class PrimitiveArrays : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class PrimitiveArrays : kotlin.Annotation { public constructor PrimitiveArrays(/*0*/ byteArray: kotlin.ByteArray, /*1*/ charArray: kotlin.CharArray, /*2*/ shortArray: kotlin.ShortArray, /*3*/ intArray: kotlin.IntArray, /*4*/ longArray: kotlin.LongArray, /*5*/ floatArray: kotlin.FloatArray, /*6*/ doubleArray: kotlin.DoubleArray, /*7*/ booleanArray: kotlin.BooleanArray) internal final val booleanArray: kotlin.BooleanArray internal final val byteArray: kotlin.ByteArray diff --git a/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitives.txt b/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitives.txt index 9607ed110cf..84b02aa9784 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitives.txt +++ b/compiler/testData/serialization/builtinsSerializer/annotationArguments/primitives.txt @@ -8,7 +8,7 @@ test.Primitives(boolean = true, byte = 7.toByte(), char = \u0025 ('%'), double = public constructor D() } -internal final annotation class Primitives : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class Primitives : kotlin.Annotation { public constructor Primitives(/*0*/ byte: kotlin.Byte, /*1*/ char: kotlin.Char, /*2*/ short: kotlin.Short, /*3*/ int: kotlin.Int, /*4*/ long: kotlin.Long, /*5*/ float: kotlin.Float, /*6*/ double: kotlin.Double, /*7*/ boolean: kotlin.Boolean) internal final val boolean: kotlin.Boolean internal final val byte: kotlin.Byte diff --git a/compiler/testData/serialization/builtinsSerializer/annotationArguments/string.txt b/compiler/testData/serialization/builtinsSerializer/annotationArguments/string.txt index 27a8890911b..fceb8171734 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationArguments/string.txt +++ b/compiler/testData/serialization/builtinsSerializer/annotationArguments/string.txt @@ -8,12 +8,12 @@ test.StringArray(stringArray = {"java", ""}) internal final class C2 { public constructor C2() } -internal final annotation class JustString : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class JustString : kotlin.Annotation { public constructor JustString(/*0*/ string: kotlin.String) internal final val string: kotlin.String } -internal final annotation class StringArray : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class StringArray : kotlin.Annotation { public constructor StringArray(/*0*/ stringArray: kotlin.Array) internal final val stringArray: kotlin.Array } diff --git a/compiler/testData/serialization/builtinsSerializer/annotationArguments/varargs.txt b/compiler/testData/serialization/builtinsSerializer/annotationArguments/varargs.txt index a65fdc5c1b1..30d245911e6 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationArguments/varargs.txt +++ b/compiler/testData/serialization/builtinsSerializer/annotationArguments/varargs.txt @@ -32,11 +32,11 @@ internal final enum class My : kotlin.Enum { public final /*synthesized*/ fun values(): kotlin.Array } -internal final annotation class ann : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation { public constructor ann(/*0*/ vararg m: test.My /*kotlin.Array*/) internal final val m: kotlin.Array } -test.ann(m = {My.ALPHA, My.BETA}) internal final annotation class annotated : kotlin.Annotation { +test.ann(m = {My.ALPHA, My.BETA}) kotlin.annotation.annotation() internal final annotation class annotated : kotlin.Annotation { public constructor annotated() } diff --git a/compiler/testData/serialization/builtinsSerializer/annotationTargets.txt b/compiler/testData/serialization/builtinsSerializer/annotationTargets.txt index 0ab4c38a7b1..b03c61aeceb 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationTargets.txt +++ b/compiler/testData/serialization/builtinsSerializer/annotationTargets.txt @@ -21,7 +21,7 @@ test.anno(x = "top level class") internal final class C1 { } } -internal final annotation class anno : kotlin.Annotation { +kotlin.annotation.annotation() internal final annotation class anno : kotlin.Annotation { public constructor anno(/*0*/ x: kotlin.String) internal final val x: kotlin.String } diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java index 447854e66f9..7a794179b36 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java @@ -645,6 +645,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { doTest(fileName); } + @TestMetadata("AnnotationAsDefaultParameter.kt") + public void testAnnotationAsDefaultParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationAsDefaultParameter.kt"); + doTest(fileName); + } + @TestMetadata("AnnotationForClassTypeParameter.kt") public void testAnnotationForClassTypeParameter() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.kt"); @@ -977,6 +983,57 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { doTest(fileName); } } + + @TestMetadata("compiler/testData/diagnostics/tests/annotations/options") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Options extends AbstractJetDiagnosticsTest { + public void testAllFilesPresentInOptions() throws Exception { + 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"); + doTest(fileName); + } + + @TestMetadata("annotationAsArgComplex.kt") + public void testAnnotationAsArgComplex() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/annotationAsArgComplex.kt"); + 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("repeatable.kt") + public void testRepeatable() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/repeatable.kt"); + doTest(fileName); + } + + @TestMetadata("retention.kt") + public void testRetention() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/retention.kt"); + doTest(fileName); + } + + @TestMetadata("target.kt") + public void testTarget() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/target.kt"); + doTest(fileName); + } + } } @TestMetadata("compiler/testData/diagnostics/tests/backingField") diff --git a/compiler/tests/org/jetbrains/kotlin/parsing/JetParsingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/parsing/JetParsingTestGenerated.java index 0d212813153..c08487d9191 100644 --- a/compiler/tests/org/jetbrains/kotlin/parsing/JetParsingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/parsing/JetParsingTestGenerated.java @@ -899,6 +899,57 @@ public class JetParsingTestGenerated extends AbstractJetParsingTest { doParsingTest(fileName); } } + + @TestMetadata("compiler/testData/psi/annotation/options") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Options extends AbstractJetParsingTest { + public void testAllFilesPresentInOptions() throws Exception { + 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"); + doParsingTest(fileName); + } + + @TestMetadata("annotationAsArgComplex.kt") + public void testAnnotationAsArgComplex() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/annotationAsArgComplex.kt"); + doParsingTest(fileName); + } + + @TestMetadata("java.kt") + public void testJava() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/java.kt"); + doParsingTest(fileName); + } + + @TestMetadata("local.kt") + public void testLocal() throws Exception { + 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/examples") diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClassClsStubBuilder.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClassClsStubBuilder.kt index f6db9e92272..a68424c06a1 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClassClsStubBuilder.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClassClsStubBuilder.kt @@ -94,7 +94,6 @@ private class ClassClsStubBuilder( } val additionalModifiers = when (classKind) { ProtoBuf.Class.Kind.ENUM_CLASS -> listOf(JetTokens.ENUM_KEYWORD) - ProtoBuf.Class.Kind.ANNOTATION_CLASS -> listOf(JetTokens.ANNOTATION_KEYWORD) ProtoBuf.Class.Kind.CLASS_OBJECT -> listOf(JetTokens.COMPANION_KEYWORD) else -> listOf() } diff --git a/idea/idea-completion/testData/basic/common/annotations/Annotated.kt b/idea/idea-completion/testData/basic/common/annotations/Annotated.kt new file mode 100644 index 00000000000..f2cd74d106d --- /dev/null +++ b/idea/idea-completion/testData/basic/common/annotations/Annotated.kt @@ -0,0 +1,3 @@ + class Annotated + +// EXIST: annotation \ No newline at end of file diff --git a/idea/idea-completion/testData/basic/common/annotations/AnnotationArguments.kt b/idea/idea-completion/testData/basic/common/annotations/AnnotationArguments.kt new file mode 100644 index 00000000000..c978d07c743 --- /dev/null +++ b/idea/idea-completion/testData/basic/common/annotations/AnnotationArguments.kt @@ -0,0 +1,4 @@ +annotation() class Annotated + +// EXIST: retention +// EXIST: repeatable diff --git a/idea/idea-completion/testData/basic/common/annotations/AnnotationTarget.kt b/idea/idea-completion/testData/basic/common/annotations/AnnotationTarget.kt new file mode 100644 index 00000000000..b5aeaea8b6c --- /dev/null +++ b/idea/idea-completion/testData/basic/common/annotations/AnnotationTarget.kt @@ -0,0 +1,3 @@ + annotation class Annotated + +// EXIST: target diff --git a/idea/idea-completion/testData/keywords/AfterClassProperty.kt b/idea/idea-completion/testData/keywords/AfterClassProperty.kt index e1c48a3f01b..93f3851a6e9 100644 --- a/idea/idea-completion/testData/keywords/AfterClassProperty.kt +++ b/idea/idea-completion/testData/keywords/AfterClassProperty.kt @@ -5,7 +5,6 @@ class MouseMovedEventArgs } // EXIST: abstract -// EXIST: annotation // EXIST: as // EXIST: class // EXIST: enum diff --git a/idea/idea-completion/testData/keywords/AfterClasses.kt b/idea/idea-completion/testData/keywords/AfterClasses.kt index 40c822bde0e..46b0c294c42 100644 --- a/idea/idea-completion/testData/keywords/AfterClasses.kt +++ b/idea/idea-completion/testData/keywords/AfterClasses.kt @@ -13,7 +13,6 @@ class B { // EXIST: abstract -// EXIST: annotation // EXIST: class // EXIST: enum // EXIST: final diff --git a/idea/idea-completion/testData/keywords/AfterFuns.kt b/idea/idea-completion/testData/keywords/AfterFuns.kt index 3cb320a7ab4..d7cde5ea482 100644 --- a/idea/idea-completion/testData/keywords/AfterFuns.kt +++ b/idea/idea-completion/testData/keywords/AfterFuns.kt @@ -11,7 +11,6 @@ class A { } // EXIST: abstract -// EXIST: annotation // EXIST: class // EXIST: enum // EXIST: final diff --git a/idea/idea-completion/testData/keywords/FileKeyword.kt b/idea/idea-completion/testData/keywords/FileKeyword.kt index d7163b48ad8..78d5ef641ec 100644 --- a/idea/idea-completion/testData/keywords/FileKeyword.kt +++ b/idea/idea-completion/testData/keywords/FileKeyword.kt @@ -1,7 +1,6 @@ @[] // EXIST: {"lookupString":"abstract","itemText":"abstract","attributes":"bold"} -// EXIST: {"lookupString":"annotation","itemText":"annotation","attributes":"bold"} // EXIST: {"lookupString":"class","itemText":"class","attributes":"bold"} // EXIST: {"lookupString":"companion object","itemText":"companion object","attributes":"bold"} // EXIST: {"lookupString":"enum","itemText":"enum","attributes":"bold"} diff --git a/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt b/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt index 1071377222e..26e88f60f75 100644 --- a/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt +++ b/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt @@ -10,7 +10,6 @@ var a : Int // EXIST: abstract -// EXIST: annotation // EXIST: by // EXIST: class // EXIST: enum diff --git a/idea/idea-completion/testData/keywords/InClassBeforeFun.kt b/idea/idea-completion/testData/keywords/InClassBeforeFun.kt index 7a59f949c52..32a9133121d 100644 --- a/idea/idea-completion/testData/keywords/InClassBeforeFun.kt +++ b/idea/idea-completion/testData/keywords/InClassBeforeFun.kt @@ -9,7 +9,6 @@ public class Test { // EXIST: abstract -// EXIST: annotation // EXIST: class // EXIST: enum // EXIST: final diff --git a/idea/idea-completion/testData/keywords/InClassScope.kt b/idea/idea-completion/testData/keywords/InClassScope.kt index 9158b047cf0..93ea7db0a6b 100644 --- a/idea/idea-completion/testData/keywords/InClassScope.kt +++ b/idea/idea-completion/testData/keywords/InClassScope.kt @@ -3,7 +3,6 @@ class TestClass { } // EXIST: abstract -// EXIST: annotation // EXIST: class // EXIST: enum // EXIST: final diff --git a/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt b/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt index cfd2c497048..139a7da2242 100644 --- a/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt +++ b/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt @@ -3,7 +3,6 @@ package Test // EXIST: abstract -// EXIST: annotation // EXIST: class // EXIST: enum // EXIST: final diff --git a/idea/idea-completion/testData/keywords/PropertyAccessors.kt b/idea/idea-completion/testData/keywords/PropertyAccessors.kt index 97fed3ffa6c..8d1a7f35848 100644 --- a/idea/idea-completion/testData/keywords/PropertyAccessors.kt +++ b/idea/idea-completion/testData/keywords/PropertyAccessors.kt @@ -4,7 +4,6 @@ class Some { } // EXIST: abstract -// EXIST: annotation // EXIST: by // EXIST: class // EXIST: enum diff --git a/idea/idea-completion/testData/keywords/PropertyAccessors2.kt b/idea/idea-completion/testData/keywords/PropertyAccessors2.kt index d0f18e763f3..5c00b0b9f28 100644 --- a/idea/idea-completion/testData/keywords/PropertyAccessors2.kt +++ b/idea/idea-completion/testData/keywords/PropertyAccessors2.kt @@ -4,7 +4,6 @@ class Some { } // EXIST: abstract -// EXIST: annotation // EXIST: as // EXIST: class // EXIST: enum diff --git a/idea/idea-completion/testData/keywords/PropertySetter.kt b/idea/idea-completion/testData/keywords/PropertySetter.kt index d1c3ac16d2e..024f79c4062 100644 --- a/idea/idea-completion/testData/keywords/PropertySetter.kt +++ b/idea/idea-completion/testData/keywords/PropertySetter.kt @@ -5,7 +5,6 @@ class Some { } // EXIST: abstract -// EXIST: annotation // EXIST: as // EXIST: class // EXIST: enum diff --git a/idea/idea-completion/testData/keywords/TopScope.kt b/idea/idea-completion/testData/keywords/TopScope.kt index df2f8c318ca..470e9e640d5 100644 --- a/idea/idea-completion/testData/keywords/TopScope.kt +++ b/idea/idea-completion/testData/keywords/TopScope.kt @@ -1,7 +1,6 @@ // EXIST: abstract -// EXIST: annotation // EXIST: class // EXIST: enum // EXIST: final diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JSBasicCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JSBasicCompletionTestGenerated.java index df3dca167dc..f4c5eb64996 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JSBasicCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JSBasicCompletionTestGenerated.java @@ -885,6 +885,24 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/annotations"), Pattern.compile("^(.+)\\.kt$"), true); } + @TestMetadata("Annotated.kt") + public void testAnnotated() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/Annotated.kt"); + doTest(fileName); + } + + @TestMetadata("AnnotationArguments.kt") + public void testAnnotationArguments() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/AnnotationArguments.kt"); + doTest(fileName); + } + + @TestMetadata("AnnotationTarget.kt") + public void testAnnotationTarget() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/AnnotationTarget.kt"); + doTest(fileName); + } + @TestMetadata("FunctionAnnotation1.kt") public void testFunctionAnnotation1() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/FunctionAnnotation1.kt"); diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java index 4a7e00f9a02..3f3935b0f2b 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java @@ -885,6 +885,24 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/annotations"), Pattern.compile("^(.+)\\.kt$"), true); } + @TestMetadata("Annotated.kt") + public void testAnnotated() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/Annotated.kt"); + doTest(fileName); + } + + @TestMetadata("AnnotationArguments.kt") + public void testAnnotationArguments() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/AnnotationArguments.kt"); + doTest(fileName); + } + + @TestMetadata("AnnotationTarget.kt") + public void testAnnotationTarget() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/AnnotationTarget.kt"); + doTest(fileName); + } + @TestMetadata("FunctionAnnotation1.kt") public void testFunctionAnnotation1() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/FunctionAnnotation1.kt"); diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/MakeClassAnAnnotationClassFix.java b/idea/src/org/jetbrains/kotlin/idea/quickfix/MakeClassAnAnnotationClassFix.java index b01f9b97b41..30a8f9466e3 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/MakeClassAnAnnotationClassFix.java +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/MakeClassAnAnnotationClassFix.java @@ -26,13 +26,12 @@ import com.intellij.psi.util.PsiTreeUtil; import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.jetbrains.kotlin.builtins.KotlinBuiltIns; import org.jetbrains.kotlin.diagnostics.Diagnostic; import org.jetbrains.kotlin.idea.JetBundle; import org.jetbrains.kotlin.idea.core.quickfix.QuickFixUtil; import org.jetbrains.kotlin.psi.*; -import static org.jetbrains.kotlin.lexer.JetTokens.ANNOTATION_KEYWORD; - public class MakeClassAnAnnotationClassFix extends JetIntentionAction { private final JetAnnotationEntry annotationEntry; private JetClass annotationClass; @@ -83,8 +82,20 @@ public class MakeClassAnAnnotationClassFix extends JetIntentionAction PsiElement.getAndRemoveCopyableUserData(key: Key): T? { val data = getCopyableUserData(key) @@ -406,7 +408,11 @@ private fun copyModifierListItems(from: PsiModifierList, to: PsiModifierList, wi } } for (annotation in from.getAnnotations()) { - to.addAnnotation(annotation.getQualifiedName()!!) + val annotationName = annotation.getQualifiedName()!! + if (KotlinBuiltIns.FQ_NAMES.annotation.asString() != annotationName + && javaClass().getName() != annotationName) { + to.addAnnotation(annotationName) + } } } diff --git a/idea/testData/highlighter/TypesAndAnnotations.kt b/idea/testData/highlighter/TypesAndAnnotations.kt index 77ece2f4208..2ebdd6f3681 100644 --- a/idea/testData/highlighter/TypesAndAnnotations.kt +++ b/idea/testData/highlighter/TypesAndAnnotations.kt @@ -4,8 +4,8 @@ interface TheTrait { class TheClass : TheTrait { } -annotation class magnificent -annotation class deprecated +annotation class magnificent +annotation class deprecated @deprecated magnificent abstract class AbstractClass<T> { diff --git a/idea/testData/stubs/AnnotationClass.expected b/idea/testData/stubs/AnnotationClass.expected index 03b373d2a49..74a06f90d3c 100644 --- a/idea/testData/stubs/AnnotationClass.expected +++ b/idea/testData/stubs/AnnotationClass.expected @@ -2,4 +2,9 @@ PsiJetFileStubImpl[package=] PACKAGE_DIRECTIVE: IMPORT_LIST: CLASS:[fqName=Test, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=Test, superNames=[]] - MODIFIER_LIST:[annotation] + MODIFIER_LIST:[] + ANNOTATION_ENTRY:[hasValueArguments=false, shortName=annotation] + CONSTRUCTOR_CALLEE: + TYPE_REFERENCE: + USER_TYPE:[isAbsoluteInRootPackage=false] + REFERENCE_EXPRESSION:[referencedName=annotation] diff --git a/idea/testData/stubs/SecondaryConstructors.expected b/idea/testData/stubs/SecondaryConstructors.expected index 278b03e45a1..080524dd1d3 100644 --- a/idea/testData/stubs/SecondaryConstructors.expected +++ b/idea/testData/stubs/SecondaryConstructors.expected @@ -77,4 +77,9 @@ 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] + MODIFIER_LIST:[] + ANNOTATION_ENTRY:[hasValueArguments=false, shortName=annotation] + CONSTRUCTOR_CALLEE: + TYPE_REFERENCE: + USER_TYPE:[isAbsoluteInRootPackage=false] + REFERENCE_EXPRESSION:[referencedName=annotation] diff --git a/idea/testData/stubs/TypeAnnotation.expected b/idea/testData/stubs/TypeAnnotation.expected index ecf82fcfa4f..b85e0320508 100644 --- a/idea/testData/stubs/TypeAnnotation.expected +++ b/idea/testData/stubs/TypeAnnotation.expected @@ -2,9 +2,19 @@ PsiJetFileStubImpl[package=] PACKAGE_DIRECTIVE: IMPORT_LIST: CLASS:[fqName=a, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=a, superNames=[]] - MODIFIER_LIST:[annotation] + MODIFIER_LIST:[] + ANNOTATION_ENTRY:[hasValueArguments=false, shortName=annotation] + CONSTRUCTOR_CALLEE: + TYPE_REFERENCE: + USER_TYPE:[isAbsoluteInRootPackage=false] + REFERENCE_EXPRESSION:[referencedName=annotation] CLASS:[fqName=b, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=b, superNames=[]] - MODIFIER_LIST:[annotation] + MODIFIER_LIST:[] + ANNOTATION_ENTRY:[hasValueArguments=false, shortName=annotation] + CONSTRUCTOR_CALLEE: + TYPE_REFERENCE: + USER_TYPE:[isAbsoluteInRootPackage=false] + REFERENCE_EXPRESSION:[referencedName=annotation] PRIMARY_CONSTRUCTOR: VALUE_PARAMETER_LIST: VALUE_PARAMETER:[fqName=b.e, hasDefaultValue=false, hasValOrVar=true, isMutable=false, name=e] diff --git a/plugins/annotation-collector/testData/collectToFile/annotationInSameFile/annotationInSameFile.kt b/plugins/annotation-collector/testData/collectToFile/annotationInSameFile/annotationInSameFile.kt index 6d4608fa2ac..238f42450cc 100644 --- a/plugins/annotation-collector/testData/collectToFile/annotationInSameFile/annotationInSameFile.kt +++ b/plugins/annotation-collector/testData/collectToFile/annotationInSameFile/annotationInSameFile.kt @@ -1,6 +1,6 @@ package org.test -public annotation class SomeAnnotation +public annotation(retention = AnnotationRetention.BINARY) class SomeAnnotation SomeAnnotation public class SomeClass { diff --git a/plugins/annotation-collector/testData/collectToFile/annotationInSameFile/annotations.txt b/plugins/annotation-collector/testData/collectToFile/annotationInSameFile/annotations.txt index 89c154ea586..e111145ea84 100644 --- a/plugins/annotation-collector/testData/collectToFile/annotationInSameFile/annotations.txt +++ b/plugins/annotation-collector/testData/collectToFile/annotationInSameFile/annotations.txt @@ -1,4 +1,6 @@ -a org.test.SomeAnnotation 0 +a kotlin.annotation.annotation 0 p org.test 0 -c 0 0/SomeClass -m 0 0/SomeClass annotatedFunction +c 0 0/SomeAnnotation +a org.test.SomeAnnotation 1 +c 1 0/SomeClass +m 1 0/SomeClass annotatedFunction