diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/load/kotlin/JavaAnnotationMethodCallChecker.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/load/kotlin/JavaAnnotationMethodCallChecker.kt deleted file mode 100644 index 7a3feef6aa5..00000000000 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/load/kotlin/JavaAnnotationMethodCallChecker.kt +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.load.kotlin - -import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.load.java.descriptors.JavaClassDescriptor -import org.jetbrains.kotlin.load.java.descriptors.JavaMethodDescriptor -import org.jetbrains.kotlin.resolve.calls.checkers.CallChecker -import org.jetbrains.kotlin.resolve.calls.context.BasicCallResolutionContext -import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall -import org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm - -public class JavaAnnotationMethodCallChecker : CallChecker { - override fun check(resolvedCall: ResolvedCall, context: BasicCallResolutionContext) { - val descriptor = resolvedCall.getCandidateDescriptor().getOriginal() - val containingDeclaration = descriptor.getContainingDeclaration() - - if (containingDeclaration is JavaClassDescriptor && - containingDeclaration.getKind() == ClassKind.ANNOTATION_CLASS && - descriptor is JavaMethodDescriptor && descriptor.getKind().isReal() - ) { - context.trace.report(ErrorsJvm.DEPRECATED_ANNOTATION_METHOD_CALL.on(resolvedCall.getCall().getCallElement())) - } - } -} diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java index 5666362396b..00b4dc73084 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java @@ -61,7 +61,6 @@ public class DefaultErrorMessagesJvm implements DefaultErrorMessages.Extension { MAP.put(ErrorsJvm.EXTERNAL_DECLARATION_CANNOT_BE_INLINED, "Members of interfaces can not be external"); MAP.put(ErrorsJvm.POSITIONED_VALUE_ARGUMENT_FOR_JAVA_ANNOTATION, "Only named arguments are available for Java annotations"); - MAP.put(ErrorsJvm.DEPRECATED_ANNOTATION_METHOD_CALL, "Annotation methods are deprecated. Use property instead"); MAP.put(ErrorsJvm.DEPRECATED_JAVA_ANNOTATION, "This annotation is deprecated in Kotlin. Use ''{0}'' instead", Renderers.TO_STRING); MAP.put(ErrorsJvm.NON_SOURCE_REPEATED_ANNOTATION, "Only annotations with SOURCE retention can be repeated on JVM version before 1.8"); MAP.put(ErrorsJvm.ANNOTATION_IS_NOT_APPLICABLE_TO_MULTIFILE_CLASSES, "Annotation {0} is not applicable to the multi-file classes", Renderers.TO_STRING); diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/platform/JvmPlatformConfigurator.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/platform/JvmPlatformConfigurator.kt index e4b0ac521ff..fca7bc02ccf 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/platform/JvmPlatformConfigurator.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/platform/JvmPlatformConfigurator.kt @@ -20,7 +20,6 @@ import org.jetbrains.kotlin.container.StorageComponentContainer import org.jetbrains.kotlin.container.useImpl import org.jetbrains.kotlin.jvm.RuntimeAssertionsTypeChecker import org.jetbrains.kotlin.load.kotlin.JavaAnnotationCallChecker -import org.jetbrains.kotlin.load.kotlin.JavaAnnotationMethodCallChecker import org.jetbrains.kotlin.load.kotlin.nativeDeclarations.NativeFunChecker import org.jetbrains.kotlin.resolve.* import org.jetbrains.kotlin.resolve.jvm.checkers.* @@ -45,7 +44,6 @@ public object JvmPlatformConfigurator : PlatformConfigurator( additionalCallCheckers = listOf( NeedSyntheticChecker(), JavaAnnotationCallChecker(), - JavaAnnotationMethodCallChecker(), TraitDefaultMethodCallChecker(), JavaClassOnCompanionChecker() ), diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt index 57de26c2159..aedd42491a5 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt @@ -4,7 +4,7 @@ class K @JavaAnn(args = arrayOf(O::class, K::class)) class MyClass fun box(): String { - val args = javaClass().getAnnotation(javaClass()).args() + val args = javaClass().getAnnotation(javaClass()).args val argName1 = args[0].simpleName ?: "fail 1" val argName2 = args[1].simpleName ?: "fail 2" return argName1 + argName2 diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt index 58839768c94..4c0e38a0d14 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt @@ -1,5 +1,5 @@ fun box(): String { - val args = javaClass().getAnnotation(javaClass()).args() + val args = javaClass().getAnnotation(javaClass()).args val argName1 = args[0].simpleName ?: "fail 1" val argName2 = args[1].simpleName ?: "fail 2" return argName1 + argName2 diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueDefault.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueDefault.kt index 093cce629d5..6447d401420 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueDefault.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueDefault.kt @@ -5,21 +5,21 @@ fun box(): String { - val value1 = javaClass().getAnnotation(javaClass()).value() + val value1 = javaClass().getAnnotation(javaClass()).value if (value1.size() != 2) return "fail1: ${value1.size()}" if (value1[0] != "d1") return "fail2: ${value1[0]}" if (value1[1] != "d2") return "fail3: ${value1[1]}" - val value2 = javaClass().getAnnotation(javaClass()).value() + val value2 = javaClass().getAnnotation(javaClass()).value if (value2.size() != 2) return "fail4: ${value2.size()}" if (value2[0] != "d1") return "fail5: ${value2[0]}" if (value2[1] != "d2") return "fail6: ${value2[1]}" - val value3 = javaClass().getAnnotation(javaClass()).value() + val value3 = javaClass().getAnnotation(javaClass()).value if (value3.size() != 1) return "fail7: ${value3.size()}" if (value3[0] != "asd") return "fail8: ${value3[0]}" - val value4 = javaClass().getAnnotation(javaClass()).value() + val value4 = javaClass().getAnnotation(javaClass()).value if (value4.size() != 0) return "fail 9: ${value4.size()}" return "OK" diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueNoDefault.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueNoDefault.kt index ae11701bb07..7e68cc3fcd0 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueNoDefault.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationArrayValueNoDefault.kt @@ -5,17 +5,17 @@ fun box(): String { - val value1 = javaClass().getAnnotation(javaClass()).value() + val value1 = javaClass().getAnnotation(javaClass()).value if (value1.size() != 0) return "fail1: ${value1.size()}" - val value2 = javaClass().getAnnotation(javaClass()).value() + val value2 = javaClass().getAnnotation(javaClass()).value if (value2.size() != 0) return "fail2: ${value2.size()}" - val value3 = javaClass().getAnnotation(javaClass()).value() + val value3 = javaClass().getAnnotation(javaClass()).value if (value3.size() != 1) return "fail3: ${value3.size()}" if (value3[0] != "asd") return "fail4: ${value3[0]}" - val value4 = javaClass().getAnnotation(javaClass()).value() + val value4 = javaClass().getAnnotation(javaClass()).value if (value4.size() != 0) return "fail 5: ${value4.size()}" return "OK" diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationCall.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationCall.kt index 7370cc165c0..63472a38667 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationCall.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationCall.kt @@ -3,6 +3,6 @@ fun box(): String { val ann = javaClass().getAnnotation(javaClass()) if (ann == null) return "fail: cannot find Ann on MyClass}" - if (ann.value() != "value") return "fail: annotation parameter i should be 'value', but was ${ann.value()}" + if (ann.value != "value") return "fail: annotation parameter i should be 'value', but was ${ann.value}" return "OK" } diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationDefault.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationDefault.kt index 38cab48b3e4..7c026047af8 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationDefault.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/javaAnnotationDefault.kt @@ -4,17 +4,17 @@ fun box(): String { val ann = javaClass().getAnnotation(javaClass()) if (ann == null) return "fail: cannot find Ann on MyClass}" - if (ann.value() != "default") return "fail: annotation parameter i should be 'default', but was ${ann.value()}" + if (ann.value != "default") return "fail: annotation parameter i should be 'default', but was ${ann.value}" val ann2 = javaClass().getAnnotation(javaClass()) if (ann2 == null) return "fail: cannot find Ann on MyClass}" - if (ann2.a() != 1) return "fail for a: expected = 1, but was ${ann2.a()}" - if (ann2.b() != 1.toByte()) return "fail for b: expected = 1, but was ${ann2.b()}" - if (ann2.c() != 1.toShort()) return "fail for c: expected = 1, but was ${ann2.c()}" - if (ann2.d() != 1.0) return "fail for d: expected = 1, but was ${ann2.d()}" - if (ann2.e() != 1F) return "fail for e: expected = 1, but was ${ann2.e()}" - if (ann2.j() != 1L) return "fail for j: expected = 1, but was ${ann2.j()}" - if (ann2.f() != "default") return "fail for f: expected = default, but was ${ann2.f()}" + if (ann2.a != 1) return "fail for a: expected = 1, but was ${ann2.a}" + if (ann2.b != 1.toByte()) return "fail for b: expected = 1, but was ${ann2.b}" + if (ann2.c != 1.toShort()) return "fail for c: expected = 1, but was ${ann2.c}" + if (ann2.d != 1.0) return "fail for d: expected = 1, but was ${ann2.d}" + if (ann2.e != 1F) return "fail for e: expected = 1, but was ${ann2.e}" + if (ann2.j != 1L) return "fail for j: expected = 1, but was ${ann2.j}" + if (ann2.f != "default") return "fail for f: expected = default, but was ${ann2.f}" return "OK" } diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/arrayClassParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/arrayClassParameter.kt index 57de26c2159..aedd42491a5 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/arrayClassParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/arrayClassParameter.kt @@ -4,7 +4,7 @@ class K @JavaAnn(args = arrayOf(O::class, K::class)) class MyClass fun box(): String { - val args = javaClass().getAnnotation(javaClass()).args() + val args = javaClass().getAnnotation(javaClass()).args val argName1 = args[0].simpleName ?: "fail 1" val argName2 = args[1].simpleName ?: "fail 2" return argName1 + argName2 diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/arrayClassParameterOnJavaClass.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/arrayClassParameterOnJavaClass.kt index 58839768c94..4c0e38a0d14 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/arrayClassParameterOnJavaClass.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/arrayClassParameterOnJavaClass.kt @@ -1,5 +1,5 @@ fun box(): String { - val args = javaClass().getAnnotation(javaClass()).args() + val args = javaClass().getAnnotation(javaClass()).args val argName1 = args[0].simpleName ?: "fail 1" val argName2 = args[1].simpleName ?: "fail 2" return argName1 + argName2 diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/classParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/classParameter.kt index 17ba50b60b3..2cd6bb8ec93 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/classParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/classParameter.kt @@ -6,5 +6,5 @@ class OK fun box(): String { val ann = javaClass().getAnnotation(javaClass()) if (ann == null) return "fail: cannot find JavaAnn on MyClass" - return ann.value().simpleName!! + return ann.value.simpleName!! } diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/classParameterOnJavaClass.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/classParameterOnJavaClass.kt index b4058cc5b92..1b94d74e2a9 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/classParameterOnJavaClass.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/classParameterOnJavaClass.kt @@ -2,5 +2,5 @@ fun box(): String { val ann = javaClass().getAnnotation(javaClass()) if (ann == null) return "fail: cannot find JavaAnn on MyClass" - return ann.value().simpleName!! + return ann.value.simpleName!! } diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/varargClassParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/varargClassParameter.kt index 853a49d5745..61e852628dc 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/varargClassParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/varargClassParameter.kt @@ -4,7 +4,7 @@ class K @JavaAnn(O::class, K::class) class MyClass fun box(): String { - val args = javaClass().getAnnotation(javaClass()).value() + val args = javaClass().getAnnotation(javaClass()).value val argName1 = args[0].simpleName ?: "fail 1" val argName2 = args[1].simpleName ?: "fail 2" return argName1 + argName2 diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/varargClassParameterOnJavaClass.kt b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/varargClassParameterOnJavaClass.kt index f2f9da17814..7bd24354004 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/varargClassParameterOnJavaClass.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/obsoleteAnnotationMethodsUsages/kClassMapping/varargClassParameterOnJavaClass.kt @@ -2,7 +2,7 @@ class O class K fun box(): String { - val args = javaClass().getAnnotation(javaClass()).value() + val args = javaClass().getAnnotation(javaClass()).value val argName1 = args[0].simpleName ?: "fail 1" val argName2 = args[1].simpleName ?: "fail 2" return argName1 + argName2 diff --git a/compiler/testData/codegen/boxWithJava/annotatedFileClasses/javaAnnotationOnFileFacade/fileFacade.kt b/compiler/testData/codegen/boxWithJava/annotatedFileClasses/javaAnnotationOnFileFacade/fileFacade.kt index a7c0fe8c083..f4af844647a 100644 --- a/compiler/testData/codegen/boxWithJava/annotatedFileClasses/javaAnnotationOnFileFacade/fileFacade.kt +++ b/compiler/testData/codegen/boxWithJava/annotatedFileClasses/javaAnnotationOnFileFacade/fileFacade.kt @@ -1,4 +1,4 @@ @file:StringHolder("OK") fun box(): String = - Class.forName("FileFacadeKt").getAnnotation(StringHolder::class.java)?.value() ?: "null" \ No newline at end of file + Class.forName("FileFacadeKt").getAnnotation(StringHolder::class.java)?.value ?: "null" \ No newline at end of file diff --git a/compiler/testData/codegen/boxWithStdlib/annotations/packageFacadeMethodsAnnotation.kt b/compiler/testData/codegen/boxWithStdlib/annotations/packageFacadeMethodsAnnotation.kt index 1ae95fa7a98..d21f65893ad 100644 --- a/compiler/testData/codegen/boxWithStdlib/annotations/packageFacadeMethodsAnnotation.kt +++ b/compiler/testData/codegen/boxWithStdlib/annotations/packageFacadeMethodsAnnotation.kt @@ -22,7 +22,7 @@ fun box(): String { throw AssertionError("Method ${method.name} has no ${kotlinDelegatedMethod.simpleName} annotation.") } - val implementationClassName = ann.implementationClassName() + val implementationClassName = ann.implementationClassName val implementationClass = try { Class.forName(implementationClassName) } diff --git a/compiler/testData/compileJavaAgainstKotlin/staticFields/kt3698.txt b/compiler/testData/compileJavaAgainstKotlin/staticFields/kt3698.txt index 073c0fc0b8e..ad621277a3a 100644 --- a/compiler/testData/compileJavaAgainstKotlin/staticFields/kt3698.txt +++ b/compiler/testData/compileJavaAgainstKotlin/staticFields/kt3698.txt @@ -15,7 +15,6 @@ public open class kt3698 { public/*package*/ final class Foo : kotlin.Annotation { public/*package*/ constructor Foo(/*0*/ kotlin.Int) public final val value: kotlin.Int - public abstract fun value(): kotlin.Int } // Static members diff --git a/compiler/testData/diagnostics/tests/namedArguments/allowForJavaAnnotation.txt b/compiler/testData/diagnostics/tests/namedArguments/allowForJavaAnnotation.txt index 0c094f7747e..f29327238ff 100644 --- a/compiler/testData/diagnostics/tests/namedArguments/allowForJavaAnnotation.txt +++ b/compiler/testData/diagnostics/tests/namedArguments/allowForJavaAnnotation.txt @@ -9,6 +9,4 @@ public final class A : 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 - public abstract fun x(): kotlin.Int - public abstract fun y(): kotlin.String } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationClassMethodCall.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationClassMethodCall.kt deleted file mode 100644 index 851fa6b7a92..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationClassMethodCall.kt +++ /dev/null @@ -1,27 +0,0 @@ -// FILE: A.java -public @interface A { - String value(); - int arg(); -} - -// FILE: b.kt -@A(value = "a", arg = 1) class MyClass - -fun foo(ann: A) { - ann.value() - ann.arg() - - ann.equals(ann) - ann.toString() - ann.hashCode() - - MyClass::class.java.getAnnotation(A::class.java).value() - MyClass::class.java.getAnnotation(A::class.java).arg() -} - -fun A.bar() { - value() - arg() - this.value() - this.arg() -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationClassMethodCall.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationClassMethodCall.txt deleted file mode 100644 index a83253c07f8..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationClassMethodCall.txt +++ /dev/null @@ -1,22 +0,0 @@ -package - -public fun foo(/*0*/ ann: A): kotlin.Unit -public fun A.bar(): kotlin.Unit - -public final class A : kotlin.Annotation { - public constructor A(/*0*/ value: kotlin.String, /*1*/ arg: kotlin.Int) - public final val arg: kotlin.Int - public final val value: kotlin.String - public abstract fun arg(): 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 - public abstract fun value(): kotlin.String -} - -@A(arg = 1, value = "a") public final class MyClass { - public constructor MyClass() - 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/testsWithStdLib/annotations/annotationParameters/orderWithValue.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithValue.txt index 41bc6d8a4e3..bdf238c14e7 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithValue.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithValue.txt @@ -8,13 +8,7 @@ public final class A : kotlin.Annotation { public final val x: kotlin.reflect.KClass<*> public final val x1: kotlin.reflect.KClass<*> public final val x2: kotlin.reflect.KClass<*> - public abstract fun a(): kotlin.Int - public abstract fun b(): kotlin.Double 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 - public abstract fun value(): kotlin.String - public abstract fun x(): kotlin.reflect.KClass<*> - public abstract fun x1(): kotlin.reflect.KClass<*> - public abstract fun x2(): kotlin.reflect.KClass<*> } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithoutValue.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithoutValue.txt index 6a068e6b817..8162553c26d 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithoutValue.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithoutValue.txt @@ -7,12 +7,7 @@ public final class A : kotlin.Annotation { public final val x: kotlin.reflect.KClass<*> public final val x1: kotlin.reflect.KClass<*> public final val x2: kotlin.reflect.KClass<*> - public abstract fun a(): kotlin.Int - public abstract fun b(): kotlin.Double 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 - public abstract fun x(): kotlin.reflect.KClass<*> - public abstract fun x1(): kotlin.reflect.KClass<*> - public abstract fun x2(): kotlin.reflect.KClass<*> } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArray.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArray.txt index 4eed1eb2627..c3f133fc4e4 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArray.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArray.txt @@ -17,7 +17,4 @@ public final class A : 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 - public abstract fun value(): kotlin.Array - public abstract fun x(): kotlin.reflect.KClass<*> - public abstract fun y(): kotlin.Int } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.txt index 2745f719998..45fc479dc72 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.txt @@ -20,7 +20,4 @@ public final class A : 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 - public abstract fun value(): kotlin.Array - public abstract fun x(): kotlin.reflect.KClass<*> - public abstract fun y(): kotlin.Int } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayOnly.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayOnly.txt index 7736beb2d8b..53b02d6624f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayOnly.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayOnly.txt @@ -12,5 +12,4 @@ public final class A : 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 - public abstract fun value(): kotlin.Array } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayWithDefault.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayWithDefault.txt index df5f7d17311..efd960ae8ba 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayWithDefault.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayWithDefault.txt @@ -12,5 +12,4 @@ public final class A : 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 - public abstract fun value(): kotlin.Array } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/javaAnnotationWithVarargArgument.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/javaAnnotationWithVarargArgument.txt index bff078b29fe..2668addc4f2 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/javaAnnotationWithVarargArgument.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/javaAnnotationWithVarargArgument.txt @@ -8,5 +8,4 @@ public final class A : 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 - public abstract fun value(): kotlin.Array } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/annotationAsArgument.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/annotationAsArgument.txt index 764ac2c67c7..a751fb9601c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/annotationAsArgument.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/annotationAsArgument.txt @@ -5,23 +5,18 @@ public final class A : kotlin.Annotation { public final val arg: kotlin.reflect.KClass<*> public final val b: B public final val x: kotlin.Int - public abstract fun arg(): kotlin.reflect.KClass<*> - public abstract fun b(): 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 - public abstract fun x(): kotlin.Int } public final class B : kotlin.Annotation { public constructor B(/*0*/ arg: kotlin.reflect.KClass<*> = ..., /*1*/ y: kotlin.Int = ...) public final val arg: kotlin.reflect.KClass<*> public final val y: kotlin.Int - public abstract fun arg(): kotlin.reflect.KClass<*> 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 - public abstract fun y(): kotlin.Int } @A(arg = kotlin.String::class, b = B(y = 1)) public final class MyClass1 { diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/arg.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/arg.txt index b4de7e10a0a..51827e7fb76 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/arg.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/arg.txt @@ -3,7 +3,6 @@ package public final class A : kotlin.Annotation { public constructor A(/*0*/ arg: kotlin.reflect.KClass<*>) public final val arg: kotlin.reflect.KClass<*> - public abstract fun arg(): kotlin.reflect.KClass<*> 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/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argAndOtherDefault.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argAndOtherDefault.txt index 3ddca2dabc9..a077648d781 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argAndOtherDefault.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argAndOtherDefault.txt @@ -4,11 +4,9 @@ public final class A : kotlin.Annotation { public constructor A(/*0*/ arg: kotlin.reflect.KClass<*>, /*1*/ x: kotlin.Int = ...) public final val arg: kotlin.reflect.KClass<*> public final val x: kotlin.Int - public abstract fun arg(): kotlin.reflect.KClass<*> 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 - public abstract fun x(): kotlin.Int } @A(arg = kotlin.String::class) public final class MyClass1 { diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argArray.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argArray.txt index cf153ea2cff..99afc92ef0f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argArray.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argArray.txt @@ -3,7 +3,6 @@ package public final class A : kotlin.Annotation { public constructor A(/*0*/ arg: kotlin.Array>) public final val arg: kotlin.Array> - public abstract fun arg(): 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/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefault.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefault.txt index eb82c2453f8..e6c1273acdc 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefault.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefault.txt @@ -3,7 +3,6 @@ package public final class A : kotlin.Annotation { public constructor A(/*0*/ arg: kotlin.reflect.KClass<*> = ...) public final val arg: kotlin.reflect.KClass<*> - public abstract fun arg(): kotlin.reflect.KClass<*> 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/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefaultAndOther.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefaultAndOther.txt index 3a86c44a60a..26441d98718 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefaultAndOther.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefaultAndOther.txt @@ -4,11 +4,9 @@ public final class A : kotlin.Annotation { public constructor A(/*0*/ arg: kotlin.reflect.KClass<*> = ..., /*1*/ x: kotlin.Int) public final val arg: kotlin.reflect.KClass<*> public final val x: kotlin.Int - public abstract fun arg(): kotlin.reflect.KClass<*> 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 - public abstract fun x(): kotlin.Int } @A(arg = kotlin.String::class, x = 4) public final class MyClass2 { diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/twoArgs.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/twoArgs.txt index 24e40104466..50118c5fbe7 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/twoArgs.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/twoArgs.txt @@ -4,8 +4,6 @@ public final class A : kotlin.Annotation { public constructor A(/*0*/ arg1: kotlin.reflect.KClass<*>, /*1*/ arg2: kotlin.reflect.KClass<*>) public final val arg1: kotlin.reflect.KClass<*> public final val arg2: kotlin.reflect.KClass<*> - public abstract fun arg1(): kotlin.reflect.KClass<*> - public abstract fun arg2(): kotlin.reflect.KClass<*> 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/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/value.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/value.txt index d3c2ef73d7d..42ad6acc304 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/value.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/value.txt @@ -6,7 +6,6 @@ public final class A : 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 - public abstract fun value(): kotlin.reflect.KClass<*> } @A(value = kotlin.String::class) public final class MyClass1 { diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueAndOtherDefault.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueAndOtherDefault.txt index 40647fd7cdd..63a195f6efa 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueAndOtherDefault.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueAndOtherDefault.txt @@ -7,8 +7,6 @@ public final class A : 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 - public abstract fun value(): kotlin.reflect.KClass<*> - public abstract fun x(): kotlin.Int } @A(value = kotlin.String::class) public final class MyClass1 { diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueArray.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueArray.txt index 07bb51dc645..dcfc7a3ed1e 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueArray.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueArray.txt @@ -6,7 +6,6 @@ public final class A : 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 - public abstract fun value(): kotlin.Array> } @A(value = {kotlin.String::class, kotlin.Int::class}) public final class MyClass1 { diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefault.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefault.txt index 252dc064cb7..45da90e22e2 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefault.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefault.txt @@ -6,7 +6,6 @@ public final class A : 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 - public abstract fun value(): kotlin.reflect.KClass<*> } @A(value = kotlin.String::class) public final class MyClass1 { diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefaultAndOther.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefaultAndOther.txt index dd6869532ac..0685cb796a2 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefaultAndOther.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefaultAndOther.txt @@ -7,8 +7,6 @@ public final class A : 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 - public abstract fun value(): kotlin.reflect.KClass<*> - public abstract fun x(): kotlin.Int } @A(value = kotlin.String::class, x = 2) public final class MyClass1 { diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/tooManyArgs.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/tooManyArgs.txt index 1f849c8c676..ed06fa75065 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/tooManyArgs.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/tooManyArgs.txt @@ -7,10 +7,7 @@ public final class A : kotlin.Annotation { public final val a: kotlin.Int public final val b: kotlin.Double public final val x: kotlin.Boolean - public abstract fun a(): kotlin.Int - public abstract fun b(): kotlin.Double 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 - public abstract fun x(): kotlin.Boolean } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/typeMismatch.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/typeMismatch.txt index 7d16b701d25..73b46c3c111 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/typeMismatch.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/typeMismatch.txt @@ -8,10 +8,7 @@ public final class A : kotlin.Annotation { public final val a: kotlin.Int public final val b: kotlin.Double public final val x: kotlin.Boolean - public abstract fun a(): kotlin.Int - public abstract fun b(): kotlin.Double 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 - public abstract fun x(): kotlin.Boolean } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withValue.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withValue.txt index e3c1d85a7a0..16eda1f6568 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withValue.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withValue.txt @@ -11,11 +11,7 @@ public final class A : kotlin.Annotation { public final val b: kotlin.Double public final val value: kotlin.String public final val x: kotlin.Boolean - public abstract fun a(): kotlin.Int - public abstract fun b(): kotlin.Double 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 - public abstract fun value(): kotlin.String - public abstract fun x(): kotlin.Boolean } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withoutValue.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withoutValue.txt index 39561705120..a6af04de796 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withoutValue.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withoutValue.txt @@ -9,10 +9,7 @@ public final class A : kotlin.Annotation { public final val a: kotlin.Int public final val b: kotlin.Double public final val x: kotlin.Boolean - public abstract fun a(): kotlin.Int - public abstract fun b(): kotlin.Double 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 - public abstract fun x(): kotlin.Boolean } diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotatedConstructor.txt b/compiler/testData/loadJava/compiledJava/annotations/AnnotatedConstructor.txt index 44c9c730cbe..433ab9a2dfe 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/AnnotatedConstructor.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotatedConstructor.txt @@ -6,6 +6,5 @@ public open class AnnotatedConstructor { public final class Anno : kotlin.Annotation { public constructor Anno(/*0*/ value: kotlin.String) public final val value: kotlin.String - public abstract fun value(): kotlin.String } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotatedField.txt b/compiler/testData/loadJava/compiledJava/annotations/AnnotatedField.txt index 3ca90cf2652..35407d45f95 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/AnnotatedField.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotatedField.txt @@ -7,7 +7,6 @@ public open class AnnotatedField { public final class Anno : kotlin.Annotation { public constructor Anno(/*0*/ value: kotlin.String) public final val value: kotlin.String - public abstract fun value(): kotlin.String } // Static members diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotatedMethod.txt b/compiler/testData/loadJava/compiledJava/annotations/AnnotatedMethod.txt index b8aaa7a81bf..f828381c072 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/AnnotatedMethod.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotatedMethod.txt @@ -7,6 +7,5 @@ public open class AnnotatedMethod { public final class Anno : kotlin.Annotation { public constructor Anno(/*0*/ value: kotlin.Int) public final val value: kotlin.Int - public abstract fun value(): kotlin.Int } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.txt b/compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.txt index 5b1c8345933..bd2ad379867 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.txt @@ -7,6 +7,5 @@ public open class AnnotatedValueParameter { public final class Anno : kotlin.Annotation { public constructor Anno(/*0*/ value: kotlin.String) public final val value: kotlin.String - public abstract fun value(): kotlin.String } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotationInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/AnnotationInParam.txt index 8b53b76698f..201f0b864ed 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/AnnotationInParam.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotationInParam.txt @@ -17,38 +17,31 @@ public interface AnnotationInParam { public final class MyAnnotation : kotlin.Annotation { public constructor MyAnnotation(/*0*/ value: kotlin.String) public final val value: kotlin.String - public abstract fun value(): kotlin.String } public final class MyAnnotation2 : kotlin.Annotation { public constructor MyAnnotation2(/*0*/ vararg value: kotlin.String /*kotlin.Array*/) public final val value: kotlin.Array - public abstract fun value(): kotlin.Array } public final class MyAnnotation3 : kotlin.Annotation { public constructor MyAnnotation3(/*0*/ first: kotlin.String, /*1*/ second: kotlin.String) public final val first: kotlin.String public final val second: kotlin.String - public abstract fun first(): kotlin.String - public abstract fun second(): kotlin.String } public final class MyAnnotationWithParam : kotlin.Annotation { public constructor MyAnnotationWithParam(/*0*/ value: test.AnnotationInParam.MyAnnotation) public final val value: test.AnnotationInParam.MyAnnotation - public abstract fun value(): test.AnnotationInParam.MyAnnotation } public final class MyAnnotationWithParam2 : kotlin.Annotation { public constructor MyAnnotationWithParam2(/*0*/ value: test.AnnotationInParam.MyAnnotation2) public final val value: test.AnnotationInParam.MyAnnotation2 - public abstract fun value(): test.AnnotationInParam.MyAnnotation2 } public final class MyAnnotationWithParam3 : kotlin.Annotation { public constructor MyAnnotationWithParam3(/*0*/ value: test.AnnotationInParam.MyAnnotation3) public final val value: test.AnnotationInParam.MyAnnotation3 - public abstract fun value(): test.AnnotationInParam.MyAnnotation3 } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.txt index 5fbfc18faf5..924c5bed2c8 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.txt @@ -6,7 +6,6 @@ public open class ArithmeticExpressionInParam { public final class Anno : kotlin.Annotation { public constructor Anno(/*0*/ value: kotlin.Int) public final val value: kotlin.Int - public abstract fun value(): kotlin.Int } @test.ArithmeticExpressionInParam.Anno(value = 42) public open class Class { diff --git a/compiler/testData/loadJava/compiledJava/annotations/ArrayOfEnumInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/ArrayOfEnumInParam.txt index 0ebf8b08c92..372752d056b 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/ArrayOfEnumInParam.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/ArrayOfEnumInParam.txt @@ -5,6 +5,5 @@ public interface ArrayOfEnumInParam { @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FIELD, AnnotationTarget.CONSTRUCTOR}) public final class targetAnnotation : kotlin.Annotation { public constructor targetAnnotation(/*0*/ value: kotlin.String) public final val value: kotlin.String - public abstract fun value(): kotlin.String } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/ArrayOfStringInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/ArrayOfStringInParam.txt index 32e53dc3b6c..820ccfaf8d6 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/ArrayOfStringInParam.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/ArrayOfStringInParam.txt @@ -9,6 +9,5 @@ public interface ArrayOfStringInParam { public final class MyAnnotation : kotlin.Annotation { public constructor MyAnnotation(/*0*/ vararg value: kotlin.String /*kotlin.Array*/) public final val value: kotlin.Array - public abstract fun value(): kotlin.Array } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.txt index 9da4f18032d..7a99ff36016 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.txt @@ -6,7 +6,6 @@ public open class ClassObjectArrayInParam { public final class Anno : kotlin.Annotation { public constructor Anno(/*0*/ vararg value: kotlin.reflect.KClass<*> /*kotlin.Array>*/) public final val value: kotlin.Array> - public abstract fun value(): kotlin.Array> } @test.ClassObjectArrayInParam.Anno(value = {test.ClassObjectArrayInParam::class, test.ClassObjectArrayInParam.Nested::class, kotlin.String::class}) public open class Nested { diff --git a/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.txt index 63f69ca8aec..54cf47aaf90 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.txt @@ -6,7 +6,6 @@ public open class ClassObjectInParam { public final class Anno : kotlin.Annotation { public constructor Anno(/*0*/ value: kotlin.reflect.KClass<*>) public final val value: kotlin.reflect.KClass<*> - public abstract fun value(): kotlin.reflect.KClass<*> } @test.ClassObjectInParam.Anno(value = test.ClassObjectInParam::class) public open class Nested { diff --git a/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.txt b/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.txt index cdf7cecf668..55ad93e9c6b 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.txt @@ -7,8 +7,6 @@ public open class ClassObjectInParamRaw { public constructor Anno(/*0*/ value: kotlin.reflect.KClass<*>, /*1*/ arg: kotlin.Array>) public final val arg: kotlin.Array> public final val value: kotlin.reflect.KClass<*> - public abstract fun arg(): kotlin.Array> - public abstract fun value(): kotlin.reflect.KClass<*> } @test.ClassObjectInParamRaw.Anno(arg = {}, value = test.ClassObjectInParamRaw::class) public open class Nested { diff --git a/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamVariance.txt b/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamVariance.txt index 0c8555932d6..c728d690cf0 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamVariance.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamVariance.txt @@ -13,13 +13,5 @@ public open class ClassObjectInParamVariance { public final val arg6: kotlin.Array!>> public final val arg7: kotlin.Array!>> public final val arg8: kotlin.Array!>> - public abstract fun arg1(): kotlin.reflect.KClass - public abstract fun arg2(): kotlin.reflect.KClass - public abstract fun arg3(): kotlin.Array> - public abstract fun arg4(): kotlin.Array> - public abstract fun arg5(): kotlin.Array!>> - public abstract fun arg6(): kotlin.Array!>> - public abstract fun arg7(): kotlin.Array!>> - public abstract fun arg8(): kotlin.Array!>> } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.txt b/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.txt index b9c9fccab50..d3bca3ae3c9 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.txt @@ -5,7 +5,6 @@ public interface CustomAnnotation { public final class MyAnnotation : kotlin.Annotation { public constructor MyAnnotation(/*0*/ value: test.CustomAnnotation.MyEnum) public final val value: test.CustomAnnotation.MyEnum - public abstract fun value(): test.CustomAnnotation.MyEnum } public final enum class MyEnum : kotlin.Enum { diff --git a/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.txt b/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.txt index d208aeec2fe..f43afe500c6 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.txt @@ -6,8 +6,6 @@ public interface CustomAnnotationWithDefaultParameter { public constructor MyAnnotation(/*0*/ first: kotlin.String, /*1*/ second: kotlin.String = ...) public final val first: kotlin.String public final val second: kotlin.String - public abstract fun first(): kotlin.String - public abstract fun second(): kotlin.String } @test.CustomAnnotationWithDefaultParameter.MyAnnotation(first = "f", second = "s") public open class MyTest { diff --git a/compiler/testData/loadJava/compiledJava/annotations/EmptyArrayInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/EmptyArrayInParam.txt index af33f51e436..2470086a033 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/EmptyArrayInParam.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/EmptyArrayInParam.txt @@ -9,6 +9,5 @@ public interface EmptyArrayInParam { public final class MyAnnotation : kotlin.Annotation { public constructor MyAnnotation(/*0*/ vararg value: kotlin.String /*kotlin.Array*/) public final val value: kotlin.Array - public abstract fun value(): kotlin.Array } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/EnumArgumentWithCustomToString.txt b/compiler/testData/loadJava/compiledJava/annotations/EnumArgumentWithCustomToString.txt index c3d3301394c..e9c0efc2a74 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/EnumArgumentWithCustomToString.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/EnumArgumentWithCustomToString.txt @@ -21,12 +21,10 @@ public open class EnumArgumentWithCustomToString { public final class EnumAnno : kotlin.Annotation { public constructor EnumAnno(/*0*/ value: test.EnumArgumentWithCustomToString.E) public final val value: test.EnumArgumentWithCustomToString.E - public abstract fun value(): test.EnumArgumentWithCustomToString.E } public final class EnumArrayAnno : kotlin.Annotation { public constructor EnumArrayAnno(/*0*/ vararg value: test.EnumArgumentWithCustomToString.E /*kotlin.Array*/) public final val value: kotlin.Array - public abstract fun value(): kotlin.Array } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.txt b/compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.txt index 371212ab6a4..59ddc23dd44 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.txt @@ -13,7 +13,6 @@ public final enum class EnumConstructorParameter : kotlin.Enum { diff --git a/compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.txt index f75b908533d..6bccc0c0dfb 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.txt @@ -14,11 +14,5 @@ public interface PrimitiveValueInParam { public final val i: kotlin.Int public final val l: kotlin.Long public final val str: kotlin.String - public abstract fun bool(): kotlin.Boolean - public abstract fun d(): kotlin.Double - public abstract fun f(): kotlin.Float - public abstract fun i(): kotlin.Int - public abstract fun l(): kotlin.Long - public abstract fun str(): kotlin.String } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.txt b/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.txt index f45dd821b2a..fa843fa145c 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.txt @@ -5,12 +5,10 @@ public interface RecursiveAnnotation { @test.RecursiveAnnotation.B(value = test.RecursiveAnnotation.A(value = "test")) public final class A : kotlin.Annotation { public constructor A(/*0*/ value: kotlin.String) public final val value: kotlin.String - public abstract fun value(): kotlin.String } @test.RecursiveAnnotation.B(value = test.RecursiveAnnotation.A(value = "test")) public final class B : kotlin.Annotation { public constructor B(/*0*/ value: test.RecursiveAnnotation.A) public final val value: test.RecursiveAnnotation.A - public abstract fun value(): test.RecursiveAnnotation.A } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.txt b/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.txt index c9464ff50d3..c244fb346f1 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.txt @@ -5,12 +5,10 @@ public interface RecursiveAnnotation2 { public final class A : kotlin.Annotation { public constructor A(/*0*/ value: test.RecursiveAnnotation2.B) public final val value: test.RecursiveAnnotation2.B - public abstract fun value(): test.RecursiveAnnotation2.B } @test.RecursiveAnnotation2.A(value = test.RecursiveAnnotation2.B(value = "test")) public final class B : kotlin.Annotation { public constructor B(/*0*/ value: kotlin.String) public final val value: kotlin.String - public abstract fun value(): kotlin.String } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/StringConcatenationInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/StringConcatenationInParam.txt index 4012c7cad0d..c420ffd4b9c 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/StringConcatenationInParam.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/StringConcatenationInParam.txt @@ -5,7 +5,6 @@ public interface StringConcatenationInParam { public final class Anno : kotlin.Annotation { public constructor Anno(/*0*/ value: kotlin.String) public final val value: kotlin.String - public abstract fun value(): kotlin.String } @test.StringConcatenationInParam.Anno(value = "hello") public open class Class { diff --git a/compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.txt index 449bad49ef9..8bb94c2b83e 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.txt @@ -5,7 +5,6 @@ public interface StringConstantInParam { public final class Anno : kotlin.Annotation { public constructor Anno(/*0*/ value: kotlin.String) public final val value: kotlin.String - public abstract fun value(): kotlin.String } @test.StringConstantInParam.Anno(value = "hello") public open class Class { diff --git a/compiler/testData/loadJava/compiledJava/annotations/StringInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/StringInParam.txt index c684d3aea03..3b8fb7fce77 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/StringInParam.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/StringInParam.txt @@ -5,7 +5,6 @@ public interface StringInParam { public final class Anno : kotlin.Annotation { public constructor Anno(/*0*/ value: kotlin.String) public final val value: kotlin.String - public abstract fun value(): kotlin.String } @test.StringInParam.Anno(value = "hello") public open class Class { diff --git a/compiler/testData/loadJava/sourceJava/NullInAnnotation.txt b/compiler/testData/loadJava/sourceJava/NullInAnnotation.txt index 89f04131208..60e0b2b5e6a 100644 --- a/compiler/testData/loadJava/sourceJava/NullInAnnotation.txt +++ b/compiler/testData/loadJava/sourceJava/NullInAnnotation.txt @@ -9,7 +9,5 @@ public interface NullInAnnotation { public constructor Ann(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Array) public final val a: kotlin.String public final val b: kotlin.Array - public abstract fun a(): kotlin.String - public abstract fun b(): kotlin.Array } } diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestWithStdLibGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestWithStdLibGenerated.java index 4b9103dc51d..20624878f4b 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestWithStdLibGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestWithStdLibGenerated.java @@ -97,12 +97,6 @@ public class JetDiagnosticsTestWithStdLibGenerated extends AbstractJetDiagnostic JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations"), Pattern.compile("^(.+)\\.kt$"), true); } - @TestMetadata("annotationClassMethodCall.kt") - public void testAnnotationClassMethodCall() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationClassMethodCall.kt"); - doTest(fileName); - } - @TestMetadata("ClassObjectAnnotatedWithItsKClass.kt") public void testClassObjectAnnotatedWithItsKClass() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsKClass.kt"); diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassMemberScope.kt b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassMemberScope.kt index 7841c0ab0f4..dc660a2244c 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassMemberScope.kt +++ b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassMemberScope.kt @@ -86,6 +86,9 @@ public class LazyJavaClassMemberScope( } override fun JavaMethodDescriptor.isVisibleAsFunction(): Boolean { + // Do not load Java annotation methods as Kotlin functions (load them as properties instead) + if (jClass.isAnnotationType) return false + if (getPropertyNamesCandidatesByAccessorName(name).any { propertyName -> getPropertiesFromSupertypes(propertyName).any { diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/MigrateAnnotationMethodCallFix.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/MigrateAnnotationMethodCallFix.kt deleted file mode 100644 index 1dacff7be47..00000000000 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/MigrateAnnotationMethodCallFix.kt +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.idea.quickfix - -import com.intellij.codeInsight.intention.IntentionAction -import com.intellij.openapi.editor.Editor -import com.intellij.openapi.project.Project -import com.intellij.psi.PsiFile -import org.jetbrains.kotlin.diagnostics.Diagnostic -import org.jetbrains.kotlin.idea.caches.resolve.analyzeFully -import org.jetbrains.kotlin.idea.quickfix.quickfixUtil.createIntentionForFirstParentOfType -import org.jetbrains.kotlin.psi.JetCallExpression -import org.jetbrains.kotlin.psi.JetFile -import org.jetbrains.kotlin.psi.JetPsiFactory -import org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm -import org.jetbrains.kotlin.utils.addIfNotNull - -public class MigrateAnnotationMethodCallFix( - expression: JetCallExpression -) : KotlinQuickFixAction(expression) { - override fun getText() = "Replace method call with property access" - override fun getFamilyName() = getText() - - override fun invoke(project: Project, editor: Editor?, file: JetFile) = replaceWithSimpleCall(element) - - companion object : JetSingleIntentionActionFactory() { - override fun createAction(diagnostic: Diagnostic) = diagnostic.createIntentionForFirstParentOfType(::MigrateAnnotationMethodCallFix) - fun replaceWithSimpleCall(expression: JetCallExpression) { - val simpleName = expression.getCalleeExpression()?.getText() ?: return - expression.replace(JetPsiFactory(expression).createSimpleName(simpleName)) - } - } -} - -class MigrateAnnotationMethodCallInWholeFile : IntentionAction { - override fun getText() = "Replace deprecated method calls with property access in current file" - override fun getFamilyName() = getText() - - override fun startInWriteAction(): Boolean = true - override fun isAvailable(project: Project, editor: Editor?, file: PsiFile?) = true - - override fun invoke(project: Project, editor: Editor?, file: PsiFile?) = (file as? JetFile)?.let { - it.analyzeFully().getDiagnostics(). - filter { it.getFactory() == ErrorsJvm.DEPRECATED_ANNOTATION_METHOD_CALL }. - forEach { - (it.getPsiElement() as? JetCallExpression)?.let { MigrateAnnotationMethodCallFix.replaceWithSimpleCall(it) } - } - } ?: Unit - - companion object : JetSingleIntentionActionFactory() { - override fun createAction(diagnostic: Diagnostic) = MigrateAnnotationMethodCallInWholeFile() - } -} diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixRegistrar.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixRegistrar.kt index fb8ae3f8387..edb3651a019 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixRegistrar.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixRegistrar.kt @@ -38,7 +38,6 @@ import org.jetbrains.kotlin.lexer.JetTokens import org.jetbrains.kotlin.lexer.JetTokens.* import org.jetbrains.kotlin.psi.JetClass import org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm -import org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm.DEPRECATED_ANNOTATION_METHOD_CALL import org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm.NO_REFLECTION_IN_CLASS_PATH import org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm.POSITIONED_VALUE_ARGUMENT_FOR_JAVA_ANNOTATION @@ -302,8 +301,6 @@ public class QuickFixRegistrar : QuickFixContributor { EXPLICIT_DELEGATION_CALL_REQUIRED.registerFactory(InsertDelegationCallQuickfix.InsertThisDelegationCallFactory) EXPLICIT_DELEGATION_CALL_REQUIRED.registerFactory(InsertDelegationCallQuickfix.InsertSuperDelegationCallFactory) - DEPRECATED_ANNOTATION_METHOD_CALL.registerFactory(MigrateAnnotationMethodCallFix, MigrateAnnotationMethodCallInWholeFile) - MISSING_CONSTRUCTOR_KEYWORD.registerFactory(MissingConstructorKeywordFix, MissingConstructorKeywordFix.createWholeProjectFixFactory()) diff --git a/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/basicMultiple.after.kt b/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/basicMultiple.after.kt deleted file mode 100644 index 0423b06ed65..00000000000 --- a/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/basicMultiple.after.kt +++ /dev/null @@ -1,6 +0,0 @@ -// "Replace method call with property access" "true" -// WITH_RUNTIME - -fun foo(ann: Ann) { - ann.value -} diff --git a/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/basicMultiple.before.Dependency.java b/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/basicMultiple.before.Dependency.java deleted file mode 100644 index 56fe1176769..00000000000 --- a/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/basicMultiple.before.Dependency.java +++ /dev/null @@ -1,3 +0,0 @@ -public @interface Ann { - int value(); -} diff --git a/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/basicMultiple.before.Main.kt b/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/basicMultiple.before.Main.kt deleted file mode 100644 index 9c938046c6a..00000000000 --- a/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/basicMultiple.before.Main.kt +++ /dev/null @@ -1,6 +0,0 @@ -// "Replace method call with property access" "true" -// WITH_RUNTIME - -fun foo(ann: Ann) { - ann.value() -} diff --git a/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/wholeFileMultiple.after.kt b/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/wholeFileMultiple.after.kt deleted file mode 100644 index 0203c9da949..00000000000 --- a/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/wholeFileMultiple.after.kt +++ /dev/null @@ -1,32 +0,0 @@ -// "Replace deprecated method calls with property access in current file" "true" -// WITH_RUNTIME - -class A { - fun foo() {} -} - -fun bar(x: Int) { - javaClass().getAnnotation(javaClass()).args[0] - javaClass().getAnnotation(javaClass()).y -} - -fun foo(ann: Ann, a: A) { - ann.value - bar(ann.x + (ann).y) - - a.foo() - - a.equals(a) - a.toString() - a.hashCode() - - class Local { - val prop = ann.arg - fun baz() { - val v = ann.args - val summ = ann.x * ann.ext() - } - - fun Ann.ext(): Int = -y - } -} diff --git a/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/wholeFileMultiple.before.Dependency.java b/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/wholeFileMultiple.before.Dependency.java deleted file mode 100644 index f750ab6fabd..00000000000 --- a/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/wholeFileMultiple.before.Dependency.java +++ /dev/null @@ -1,7 +0,0 @@ -public @interface Ann { - Class value(); - int x() default 1; - int y() default 2; - Class arg() default String; - Class[] args() default {}; -} diff --git a/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/wholeFileMultiple.before.Main.kt b/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/wholeFileMultiple.before.Main.kt deleted file mode 100644 index 065e81fe718..00000000000 --- a/idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/wholeFileMultiple.before.Main.kt +++ /dev/null @@ -1,32 +0,0 @@ -// "Replace deprecated method calls with property access in current file" "true" -// WITH_RUNTIME - -class A { - fun foo() {} -} - -fun bar(x: Int) { - javaClass().getAnnotation(javaClass()).args()[0] - javaClass().getAnnotation(javaClass()).y() -} - -fun foo(ann: Ann, a: A) { - ann.value() - bar(ann.x() + (ann).y()) - - a.foo() - - a.equals(a) - a.toString() - a.hashCode() - - class Local { - val prop = ann.arg() - fun baz() { - val v = ann.args() - val summ = ann.x() * ann.ext() - } - - fun Ann.ext(): Int = -y() - } -} diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java index 9e14f2f3f51..ee3554fedb6 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java @@ -1213,27 +1213,6 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes } } - @TestMetadata("idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MigrateJavaAnnotationMethodCall extends AbstractQuickFixMultiFileTest { - public void testAllFilesPresentInMigrateJavaAnnotationMethodCall() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); - } - - @TestMetadata("basicMultiple.before.Main.kt") - public void testBasicMultiple() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/basicMultiple.before.Main.kt"); - doTestWithExtraFile(fileName); - } - - @TestMetadata("wholeFileMultiple.before.Main.kt") - public void testWholeFileMultiple() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/migration/migrateJavaAnnotationMethodCall/wholeFileMultiple.before.Main.kt"); - doTestWithExtraFile(fileName); - } - } - @TestMetadata("idea/testData/quickfix/migration/missingConstructorKeyword") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)