diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/DescriptorResolver.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/DescriptorResolver.java index 45b0e8e4a8a..7015d54f9b7 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/DescriptorResolver.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/DescriptorResolver.java @@ -350,15 +350,6 @@ public class DescriptorResolver { annotationResolver.resolveAnnotationsWithoutArguments(scope, valueParameter.getModifierList(), trace)); } - @NotNull - public ValueParameterDescriptorImpl resolveValueParameterDescriptorWithAnnotationArguments( - JetScope scope, DeclarationDescriptor declarationDescriptor, - JetParameter valueParameter, int index, JetType type, BindingTrace trace - ) { - return resolveValueParameterDescriptor(declarationDescriptor, valueParameter, index, type, trace, - annotationResolver.resolveAnnotationsWithArguments(scope, valueParameter.getModifierList(), trace)); - } - @NotNull private ValueParameterDescriptorImpl resolveValueParameterDescriptor( DeclarationDescriptor declarationDescriptor, diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/FunctionDescriptorResolver.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/FunctionDescriptorResolver.kt index f461222077b..e46cf911df8 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/FunctionDescriptorResolver.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/FunctionDescriptorResolver.kt @@ -88,7 +88,7 @@ class FunctionDescriptorResolver( ): SimpleFunctionDescriptor { val functionDescriptor = functionConstructor( containingDescriptor, - annotationResolver.resolveAnnotationsWithArguments(scope, function.getModifierList(), trace), + annotationResolver.resolveAnnotationsWithoutArguments(scope, function.getModifierList(), trace), function.getNameAsSafeName(), CallableMemberDescriptor.Kind.DECLARATION, function.toSourceElement() @@ -338,7 +338,7 @@ class FunctionDescriptorResolver( checkConstructorParameterHasNoModifier(trace, valueParameter) } - val valueParameterDescriptor = descriptorResolver.resolveValueParameterDescriptorWithAnnotationArguments(parameterScope, functionDescriptor, + val valueParameterDescriptor = descriptorResolver.resolveValueParameterDescriptor(parameterScope, functionDescriptor, valueParameter, i, type, trace) parameterScope.addVariableDescriptor(valueParameterDescriptor) result.add(valueParameterDescriptor) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/LazyDeclarationResolver.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/LazyDeclarationResolver.java index 321710c6773..273e7c4b80f 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/LazyDeclarationResolver.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/LazyDeclarationResolver.java @@ -26,6 +26,7 @@ import org.jetbrains.kotlin.name.Name; import org.jetbrains.kotlin.psi.*; import org.jetbrains.kotlin.psi.psiUtil.PsiUtilPackage; import org.jetbrains.kotlin.renderer.DescriptorRenderer; +import org.jetbrains.kotlin.resolve.AnnotationResolver; import org.jetbrains.kotlin.resolve.BindingContext; import org.jetbrains.kotlin.resolve.BindingTrace; import org.jetbrains.kotlin.resolve.lazy.descriptors.LazyPackageDescriptor; @@ -210,6 +211,7 @@ public class LazyDeclarationResolver { throw new IllegalStateException("No descriptor resolved for " + declaration + ":\n" + PsiUtilPackage.getElementTextWithContext(declaration)); } + AnnotationResolver.resolveAnnotationsArguments(result.getAnnotations(), trace); return result; } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/AbstractLazyMemberScope.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/AbstractLazyMemberScope.kt index 87a9f7a73ff..b98188e1477 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/AbstractLazyMemberScope.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/AbstractLazyMemberScope.kt @@ -101,7 +101,6 @@ public abstract class AbstractLazyMemberScopebar()) fun foo() = 1 +ann(foo()) fun bar() = 2 \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.txt b/compiler/testData/diagnostics/tests/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.txt new file mode 100644 index 00000000000..1a968299ed7 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.txt @@ -0,0 +1,12 @@ +package + +ann() internal fun bar(): kotlin.Int +ann() internal fun foo(): kotlin.Int + +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 + 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/RecursivelyAnnotated.kt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotated.kt new file mode 100644 index 00000000000..4f1a151932f --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotated.kt @@ -0,0 +1,3 @@ +// Class CAN be recursively annotated +RecursivelyAnnotated(1) +annotation class RecursivelyAnnotated(val x: Int) \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotated.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotated.txt new file mode 100644 index 00000000000..b482ef5cd90 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotated.txt @@ -0,0 +1,9 @@ +package + +RecursivelyAnnotated(x = IntegerValueType(1): IntegerValueType(1)) 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 + 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/RecursivelyAnnotatedFunctionParameter.kt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedFunctionParameter.kt new file mode 100644 index 00000000000..89de31c26a3 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedFunctionParameter.kt @@ -0,0 +1,3 @@ +// Function parameter CAN be recursively annotated +annotation class ann(val x: Int) +fun foo(@ann(foo(1)) x: Int): Int = x \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedFunctionParameter.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedFunctionParameter.txt new file mode 100644 index 00000000000..06458119e3f --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedFunctionParameter.txt @@ -0,0 +1,11 @@ +package + +internal fun foo(/*0*/ ann() x: kotlin.Int): kotlin.Int + +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 + 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/RecursivelyAnnotatedGlobalFunction.kt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalFunction.kt new file mode 100644 index 00000000000..cbe17924315 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalFunction.kt @@ -0,0 +1,3 @@ +// Functions can be recursively annotated +annotation class ann(val x: Int) +ann(foo()) fun foo() = 1 \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalFunction.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalFunction.txt new file mode 100644 index 00000000000..d2c0ba12aba --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalFunction.txt @@ -0,0 +1,11 @@ +package + +ann() internal fun foo(): kotlin.Int + +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 + 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/RecursivelyAnnotatedGlobalProperty.kt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalProperty.kt new file mode 100644 index 00000000000..dc51a248052 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalProperty.kt @@ -0,0 +1,3 @@ +// Properties can be recursively annotated +annotation class ann(val x: Int) +ann(x) val x: Int = 1 \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalProperty.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalProperty.txt new file mode 100644 index 00000000000..0f85b0f6783 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalProperty.txt @@ -0,0 +1,11 @@ +package + +ann(x = 1: kotlin.Int) internal val x: kotlin.Int = 1 + +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 + 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/RecursivelyAnnotatedParameter.kt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameter.kt new file mode 100644 index 00000000000..2c351f16696 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameter.kt @@ -0,0 +1,2 @@ +// Class constructor parameter CAN be recursively annotated +annotation class RecursivelyAnnotated(RecursivelyAnnotated(1) val x: Int) \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameter.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameter.txt new file mode 100644 index 00000000000..19007518ae4 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameter.txt @@ -0,0 +1,9 @@ +package + +internal final annotation class RecursivelyAnnotated : kotlin.Annotation { + public constructor RecursivelyAnnotated(/*0*/ RecursivelyAnnotated(x = IntegerValueType(1): IntegerValueType(1)) x: kotlin.Int) + RecursivelyAnnotated(x = IntegerValueType(1): IntegerValueType(1)) 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 +} diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterWithAt.kt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterWithAt.kt new file mode 100644 index 00000000000..e4277530222 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterWithAt.kt @@ -0,0 +1,2 @@ +// Class constructor parameter CAN be recursively annotated +annotation class RecursivelyAnnotated(@RecursivelyAnnotated(1) val x: Int) \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterWithAt.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterWithAt.txt new file mode 100644 index 00000000000..19007518ae4 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterWithAt.txt @@ -0,0 +1,9 @@ +package + +internal final annotation class RecursivelyAnnotated : kotlin.Annotation { + public constructor RecursivelyAnnotated(/*0*/ RecursivelyAnnotated(x = IntegerValueType(1): IntegerValueType(1)) x: kotlin.Int) + RecursivelyAnnotated(x = IntegerValueType(1): IntegerValueType(1)) 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 +} diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedProperty.kt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedProperty.kt new file mode 100644 index 00000000000..4a68ee5f092 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedProperty.kt @@ -0,0 +1,5 @@ +// Properties can be recursively annotated +annotation class ann(val x: Int) +class My { + ann(x) val x: Int = 1 +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedProperty.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedProperty.txt new file mode 100644 index 00000000000..1859c4a2d45 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedProperty.txt @@ -0,0 +1,17 @@ +package + +internal final class My { + public constructor My() + ann(x = 1: kotlin.Int) internal final val x: kotlin.Int = 1 + 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 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 + 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/RecursivelyIncorrectlyAnnotatedParameter.kt b/compiler/testData/diagnostics/tests/annotations/RecursivelyIncorrectlyAnnotatedParameter.kt new file mode 100644 index 00000000000..a886f3e7933 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyIncorrectlyAnnotatedParameter.kt @@ -0,0 +1,2 @@ +// Class constructor parameter CAN be recursively annotated +class RecursivelyAnnotated(RecursivelyAnnotated(1) val x: Int) \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/RecursivelyIncorrectlyAnnotatedParameter.txt b/compiler/testData/diagnostics/tests/annotations/RecursivelyIncorrectlyAnnotatedParameter.txt new file mode 100644 index 00000000000..f00e7877404 --- /dev/null +++ b/compiler/testData/diagnostics/tests/annotations/RecursivelyIncorrectlyAnnotatedParameter.txt @@ -0,0 +1,9 @@ +package + +internal final class RecursivelyAnnotated { + public constructor RecursivelyAnnotated(/*0*/ RecursivelyAnnotated(x = IntegerValueType(1): IntegerValueType(1)) x: kotlin.Int) + RecursivelyAnnotated(x = IntegerValueType(1): IntegerValueType(1)) 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 +} diff --git a/compiler/testData/diagnostics/tests/regressions/ea66984.kt b/compiler/testData/diagnostics/tests/regressions/ea66984.kt new file mode 100644 index 00000000000..054e4f5330d --- /dev/null +++ b/compiler/testData/diagnostics/tests/regressions/ea66984.kt @@ -0,0 +1,2 @@ +// !DIAGNOSTICS: -NO_VALUE_FOR_PARAMETER +class Tree(T element, Tree left, Tree right) {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/regressions/ea66984.txt b/compiler/testData/diagnostics/tests/regressions/ea66984.txt new file mode 100644 index 00000000000..575b5f26be6 --- /dev/null +++ b/compiler/testData/diagnostics/tests/regressions/ea66984.txt @@ -0,0 +1,8 @@ +package + +internal final class Tree { + public constructor Tree(/*0*/ [ERROR : Not an annotation: T]() element: [ERROR : Type annotation was missing for parameter element], /*1*/ Tree() left: [ERROR : Type annotation was missing for parameter left], /*2*/ Tree() right: [ERROR : Type annotation was missing for parameter right]) + 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/regression/ea63992.kt b/compiler/testData/diagnostics/testsWithStdLib/regression/ea63992.kt new file mode 100644 index 00000000000..0e41e5068ba --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/regression/ea63992.kt @@ -0,0 +1,7 @@ +fun add(a: Int, b: Int) = a + b +interface A { + fun shuffle(x: List): List + fun foo(f : (List) -> List, x : List) + +fun f() : (Int, Int) -> Int = ::add +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/regression/ea63992.txt b/compiler/testData/diagnostics/testsWithStdLib/regression/ea63992.txt new file mode 100644 index 00000000000..26eca5a665f --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/regression/ea63992.txt @@ -0,0 +1,12 @@ +package + +internal fun add(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int + +internal interface A { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + internal open fun f(): (kotlin.Int, kotlin.Int) -> kotlin.Int + internal abstract fun foo(/*0*/ f: (kotlin.List) -> kotlin.List, /*1*/ x: kotlin.List): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + internal abstract fun shuffle(/*0*/ x: kotlin.List): kotlin.List + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java index 62cbc0b9ff5..336340f212c 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java @@ -597,6 +597,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { doTest(fileName); } + @TestMetadata("AnnotatedConstructor.kt") + public void testAnnotatedConstructor() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedConstructor.kt"); + doTest(fileName); + } + @TestMetadata("AnnotatedConstructorParams.kt") public void testAnnotatedConstructorParams() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedConstructorParams.kt"); @@ -765,6 +771,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { doTest(fileName); } + @TestMetadata("MutuallyRecursivelyAnnotatedGlobalFunction.kt") + public void testMutuallyRecursivelyAnnotatedGlobalFunction() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.kt"); + doTest(fileName); + } + @TestMetadata("noNameProperty.kt") public void testNoNameProperty() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/noNameProperty.kt"); @@ -813,6 +825,54 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { doTest(fileName); } + @TestMetadata("RecursivelyAnnotated.kt") + public void testRecursivelyAnnotated() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotated.kt"); + doTest(fileName); + } + + @TestMetadata("RecursivelyAnnotatedFunctionParameter.kt") + public void testRecursivelyAnnotatedFunctionParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedFunctionParameter.kt"); + doTest(fileName); + } + + @TestMetadata("RecursivelyAnnotatedGlobalFunction.kt") + public void testRecursivelyAnnotatedGlobalFunction() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalFunction.kt"); + doTest(fileName); + } + + @TestMetadata("RecursivelyAnnotatedGlobalProperty.kt") + public void testRecursivelyAnnotatedGlobalProperty() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalProperty.kt"); + doTest(fileName); + } + + @TestMetadata("RecursivelyAnnotatedParameter.kt") + public void testRecursivelyAnnotatedParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameter.kt"); + doTest(fileName); + } + + @TestMetadata("RecursivelyAnnotatedParameterWithAt.kt") + public void testRecursivelyAnnotatedParameterWithAt() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterWithAt.kt"); + doTest(fileName); + } + + @TestMetadata("RecursivelyAnnotatedProperty.kt") + public void testRecursivelyAnnotatedProperty() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedProperty.kt"); + doTest(fileName); + } + + @TestMetadata("RecursivelyIncorrectlyAnnotatedParameter.kt") + public void testRecursivelyIncorrectlyAnnotatedParameter() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyIncorrectlyAnnotatedParameter.kt"); + doTest(fileName); + } + @TestMetadata("typeAnnotations.kt") public void testTypeAnnotations() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/typeAnnotations.kt"); @@ -10122,6 +10182,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { doTest(fileName); } + @TestMetadata("ea66984.kt") + public void testEa66984() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea66984.kt"); + doTest(fileName); + } + @TestMetadata("ErrorsOnIbjectExpressionsAsParameters.kt") public void testErrorsOnIbjectExpressionsAsParameters() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ErrorsOnIbjectExpressionsAsParameters.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestWithStdLibGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestWithStdLibGenerated.java index 28333b5357f..d1bee973c50 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestWithStdLibGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestWithStdLibGenerated.java @@ -713,6 +713,21 @@ public class JetDiagnosticsTestWithStdLibGenerated extends AbstractJetDiagnostic } } + @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/regression") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Regression extends AbstractJetDiagnosticsTestWithStdLib { + public void testAllFilesPresentInRegression() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/regression"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("ea63992.kt") + public void testEa63992() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/ea63992.kt"); + doTest(fileName); + } + } + @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/reified") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)