diff --git a/compiler/fir/analysis-tests/testData/resolve/problems/multipleJavaClassesInOneFile.kt b/compiler/fir/analysis-tests/testData/resolve/problems/multipleJavaClassesInOneFile.kt index cf7361f6633..3750ae5a08e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/problems/multipleJavaClassesInOneFile.kt +++ b/compiler/fir/analysis-tests/testData/resolve/problems/multipleJavaClassesInOneFile.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // FILE: foo/Some.java package foo; diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.kt index b56220f6c3b..c061c4a9804 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // FILE: K1.kt class KSub : J1() diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/KJKComplexHierarchyNestedLoop.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/KJKComplexHierarchyNestedLoop.kt index 151031d03c9..87fe2e60826 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/KJKComplexHierarchyNestedLoop.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/KJKComplexHierarchyNestedLoop.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // FILE: K1.kt class K2: J1() { class Q : Nested() diff --git a/compiler/testData/diagnostics/tests/enum/enumMissingName.kt b/compiler/testData/diagnostics/tests/enum/enumMissingName.kt index c1f009ea8e7..32eb78f5336 100644 --- a/compiler/testData/diagnostics/tests/enum/enumMissingName.kt +++ b/compiler/testData/diagnostics/tests/enum/enumMissingName.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // FIR_IDENTICAL // Error: name should present enum class(val rgb : Int) { diff --git a/compiler/testData/diagnostics/tests/evaluate/inlineClasses/constructorOfUnsignedType.fir.kt b/compiler/testData/diagnostics/tests/evaluate/inlineClasses/constructorOfUnsignedType.fir.kt index b0e4cee2151..198ba2da10e 100644 --- a/compiler/testData/diagnostics/tests/evaluate/inlineClasses/constructorOfUnsignedType.fir.kt +++ b/compiler/testData/diagnostics/tests/evaluate/inlineClasses/constructorOfUnsignedType.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !LANGUAGE: +InlineClasses, -JvmInlineValueClasses // SKIP_JAVAC diff --git a/compiler/testData/diagnostics/tests/evaluate/inlineClasses/constructorOfUnsignedType.kt b/compiler/testData/diagnostics/tests/evaluate/inlineClasses/constructorOfUnsignedType.kt index 0d6b247ecc1..44018a3e144 100644 --- a/compiler/testData/diagnostics/tests/evaluate/inlineClasses/constructorOfUnsignedType.kt +++ b/compiler/testData/diagnostics/tests/evaluate/inlineClasses/constructorOfUnsignedType.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !LANGUAGE: +InlineClasses, -JvmInlineValueClasses // SKIP_JAVAC diff --git a/compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.fir.kt b/compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.fir.kt index 65e91ba8ee7..4a010aaab97 100644 --- a/compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // SKIP_JAVAC // FILE: JavaClass.java public class JavaClass { diff --git a/compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.kt b/compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.kt index 6281dc58eda..022af2e2974 100644 --- a/compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.kt +++ b/compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // SKIP_JAVAC // FILE: JavaClass.java public class JavaClass { diff --git a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.fir.kt b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.fir.kt index f74f7cd9f22..3cc459f591a 100644 --- a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !WITH_NEW_INFERENCE // See KT-6271 fun foo() { diff --git a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt index b46cb2378ed..c644c0971a8 100644 --- a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt +++ b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !WITH_NEW_INFERENCE // See KT-6271 fun foo() { diff --git a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.fir.kt b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.fir.kt index def59b45ae8..cc019054899 100644 --- a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !WITH_NEW_INFERENCE fun foo() { fun bar() = (fun() = bar()) diff --git a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.kt b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.kt index 5c3e0d4b4e0..f122176d638 100644 --- a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.kt +++ b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !WITH_NEW_INFERENCE fun foo() { fun bar() = (fun() = bar()) diff --git a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.fir.kt b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.fir.kt index ffe65d1b70d..7d557b5e535 100644 --- a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !WITH_NEW_INFERENCE fun foo() { fun bar() = { diff --git a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.kt b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.kt index b125d59d23a..56545bcc2df 100644 --- a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.kt +++ b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !WITH_NEW_INFERENCE fun foo() { fun bar() = { diff --git a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.fir.kt b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.fir.kt index fecf410cbb3..75149b12bb9 100644 --- a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !WITH_NEW_INFERENCE fun foo() { fun bar1() = bar1() diff --git a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.kt b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.kt index 45213345f01..2dad1767344 100644 --- a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.kt +++ b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !WITH_NEW_INFERENCE fun foo() { fun bar1() = bar1() diff --git a/compiler/testData/diagnostics/tests/j+k/differentFilename.fir.kt b/compiler/testData/diagnostics/tests/j+k/differentFilename.fir.kt index 9533eb94d34..5ec60e3bc91 100644 --- a/compiler/testData/diagnostics/tests/j+k/differentFilename.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/differentFilename.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // SKIP_JAVAC // FILE: A.java public class A { diff --git a/compiler/testData/diagnostics/tests/j+k/differentFilename.kt b/compiler/testData/diagnostics/tests/j+k/differentFilename.kt index 545704650fc..def27f11d42 100644 --- a/compiler/testData/diagnostics/tests/j+k/differentFilename.kt +++ b/compiler/testData/diagnostics/tests/j+k/differentFilename.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // SKIP_JAVAC // FILE: A.java public class A { diff --git a/compiler/testData/diagnostics/tests/javac/imports/TopLevelClassVsPackage.kt b/compiler/testData/diagnostics/tests/javac/imports/TopLevelClassVsPackage.kt index 4ed35cfc51f..39918b20ae4 100644 --- a/compiler/testData/diagnostics/tests/javac/imports/TopLevelClassVsPackage.kt +++ b/compiler/testData/diagnostics/tests/javac/imports/TopLevelClassVsPackage.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // FIR_IDENTICAL // FILE: a/b.java package a; diff --git a/compiler/testData/diagnostics/tests/javac/imports/TopLevelClassVsPackage2.kt b/compiler/testData/diagnostics/tests/javac/imports/TopLevelClassVsPackage2.kt index d885d4b4fb6..2eb5c698ded 100644 --- a/compiler/testData/diagnostics/tests/javac/imports/TopLevelClassVsPackage2.kt +++ b/compiler/testData/diagnostics/tests/javac/imports/TopLevelClassVsPackage2.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // FIR_IDENTICAL // FILE: foo/a/b.java package foo.a; diff --git a/compiler/testData/diagnostics/tests/javac/qualifiedExpression/PackageVsClass.kt b/compiler/testData/diagnostics/tests/javac/qualifiedExpression/PackageVsClass.kt index 0a5a9f6a7ed..87df31d4e7e 100644 --- a/compiler/testData/diagnostics/tests/javac/qualifiedExpression/PackageVsClass.kt +++ b/compiler/testData/diagnostics/tests/javac/qualifiedExpression/PackageVsClass.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // FIR_IDENTICAL // FILE: a/b/c.java package a.b; diff --git a/compiler/testData/diagnostics/tests/javac/qualifiedExpression/PackageVsRootClass.kt b/compiler/testData/diagnostics/tests/javac/qualifiedExpression/PackageVsRootClass.kt index b0c2ea1d9c1..b3b0a96350d 100644 --- a/compiler/testData/diagnostics/tests/javac/qualifiedExpression/PackageVsRootClass.kt +++ b/compiler/testData/diagnostics/tests/javac/qualifiedExpression/PackageVsRootClass.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // FIR_IDENTICAL // FILE: a/b.java package a; diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedRecursiveTypeArgumentAndNonRecursive.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedRecursiveTypeArgumentAndNonRecursive.fir.kt index 17f89b06a6e..3c1357d9836 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedRecursiveTypeArgumentAndNonRecursive.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedRecursiveTypeArgumentAndNonRecursive.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // WITH_RUNTIME // FULL_JDK diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedRecursiveTypeArgumentAndNonRecursive.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedRecursiveTypeArgumentAndNonRecursive.kt index 9fbe2c5b137..510d2600ffb 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedRecursiveTypeArgumentAndNonRecursive.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedRecursiveTypeArgumentAndNonRecursive.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // WITH_RUNTIME // FULL_JDK diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedTypeArgumentIfRecursive.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedTypeArgumentIfRecursive.fir.kt index 0bc39e05135..734a9275481 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedTypeArgumentIfRecursive.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedTypeArgumentIfRecursive.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // WITH_RUNTIME // FULL_JDK diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedTypeArgumentIfRecursive.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedTypeArgumentIfRecursive.kt index 07f1973de18..a5ff3a94830 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedTypeArgumentIfRecursive.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedTypeArgumentIfRecursive.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // WITH_RUNTIME // FULL_JDK diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteAnotherErasedTypeArgument.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteAnotherErasedTypeArgument.fir.kt index 06bf7d09d0e..49879eecebb 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteAnotherErasedTypeArgument.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteAnotherErasedTypeArgument.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // WITH_RUNTIME // FULL_JDK diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteAnotherErasedTypeArgument.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteAnotherErasedTypeArgument.kt index 8ad2675e928..1b57896caf1 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteAnotherErasedTypeArgument.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteAnotherErasedTypeArgument.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // WITH_RUNTIME // FULL_JDK diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteOtherErasedDeepTypeArguments.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteOtherErasedDeepTypeArguments.fir.kt index cf5a6a0296c..d3f717259fb 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteOtherErasedDeepTypeArguments.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteOtherErasedDeepTypeArguments.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // WITH_RUNTIME // FULL_JDK diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteOtherErasedDeepTypeArguments.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteOtherErasedDeepTypeArguments.kt index 107e5a35083..0adc68f346a 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteOtherErasedDeepTypeArguments.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteOtherErasedDeepTypeArguments.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // WITH_RUNTIME // FULL_JDK diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedDependentTypeArguments.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedDependentTypeArguments.fir.kt index 99d560600eb..ee6c16cc153 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedDependentTypeArguments.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedDependentTypeArguments.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // WITH_RUNTIME // FULL_JDK diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedDependentTypeArguments.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedDependentTypeArguments.kt index a750670d2e6..8ff6d272907 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedDependentTypeArguments.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedDependentTypeArguments.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // WITH_RUNTIME // FULL_JDK diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedTypeArguments.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedTypeArguments.fir.kt index 1f949aec856..c0e71b5cfbf 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedTypeArguments.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedTypeArguments.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // WITH_RUNTIME // FULL_JDK diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedTypeArguments.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedTypeArguments.kt index 5e7857a9bc7..5e71aef7859 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedTypeArguments.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedTypeArguments.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // WITH_RUNTIME // FULL_JDK diff --git a/compiler/testData/diagnostics/tests/redeclarations/ClassRedeclarationInDifferentFiles.fir.kt b/compiler/testData/diagnostics/tests/redeclarations/ClassRedeclarationInDifferentFiles.fir.kt index adfd5421eed..bd4419cd9f3 100644 --- a/compiler/testData/diagnostics/tests/redeclarations/ClassRedeclarationInDifferentFiles.fir.kt +++ b/compiler/testData/diagnostics/tests/redeclarations/ClassRedeclarationInDifferentFiles.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // FILE: f1.kt package test diff --git a/compiler/testData/diagnostics/tests/redeclarations/ClassRedeclarationInDifferentFiles.kt b/compiler/testData/diagnostics/tests/redeclarations/ClassRedeclarationInDifferentFiles.kt index c75a5227949..b374beefba0 100644 --- a/compiler/testData/diagnostics/tests/redeclarations/ClassRedeclarationInDifferentFiles.kt +++ b/compiler/testData/diagnostics/tests/redeclarations/ClassRedeclarationInDifferentFiles.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // FILE: f1.kt package test diff --git a/compiler/testData/diagnostics/tests/regressions/kt9384.fir.kt b/compiler/testData/diagnostics/tests/regressions/kt9384.fir.kt index a27c08faa28..b309d2118fd 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt9384.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt9384.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !DIAGNOSTICS: -UNUSED_PARAMETER fun main(args: Array) { fun f() = run { diff --git a/compiler/testData/diagnostics/tests/regressions/kt9384.kt b/compiler/testData/diagnostics/tests/regressions/kt9384.kt index d169b5cf356..f16eb9cbfbd 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt9384.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt9384.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !DIAGNOSTICS: -UNUSED_PARAMETER fun main(args: Array) { fun f() = run { diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.fir.kt index 2730e8314f6..2dff77654d4 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.fir.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // JAVAC_EXPECTED_FILE // FILE: KotlinFile.kt fun foo(javaClass: JavaClass): String { diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.kt index 9240e501a88..5889ec3f4b8 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // JAVAC_EXPECTED_FILE // FILE: KotlinFile.kt fun foo(javaClass: JavaClass): String { diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.fir.kt index a5dff1d25d7..2af00146d3d 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.fir.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // JAVAC_EXPECTED_FILE // FILE: KotlinFile.kt fun foo(javaClass: JavaClass): String { diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.kt index ffa5c54f4e0..b310a8c00f8 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // JAVAC_EXPECTED_FILE // FILE: KotlinFile.kt fun foo(javaClass: JavaClass): String { diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.fir.kt index dc9c84221df..abd17056fb1 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.fir.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // JAVAC_EXPECTED_FILE // FILE: KotlinFile.kt fun foo(javaClass: JavaClass) { diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.kt index 551aeadc9e5..db0d9af7eba 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // JAVAC_EXPECTED_FILE // FILE: KotlinFile.kt fun foo(javaClass: JavaClass) { diff --git a/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/throwableConstructor.fir.kt b/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/throwableConstructor.fir.kt index 918ba3b6380..66334b1fad5 100644 --- a/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/throwableConstructor.fir.kt +++ b/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/throwableConstructor.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !JDK_KIND: MODIFIED_MOCK_JDK abstract class A : Throwable(1.0) {} diff --git a/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/throwableConstructor.kt b/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/throwableConstructor.kt index 61b73c357c8..b551e00660e 100644 --- a/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/throwableConstructor.kt +++ b/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/throwableConstructor.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !JDK_KIND: MODIFIED_MOCK_JDK abstract class A : Throwable(1.0) {} diff --git a/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/disabledFeature.fir.kt b/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/disabledFeature.fir.kt index 2048c53037b..4286e1f16ae 100644 --- a/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/disabledFeature.fir.kt +++ b/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/disabledFeature.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !API_VERSION: 1.5 // !LANGUAGE: -JvmRecordSupport // SKIP_TXT diff --git a/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/disabledFeature.kt b/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/disabledFeature.kt index c518c1bcecc..178afad4f6c 100644 --- a/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/disabledFeature.kt +++ b/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/disabledFeature.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !API_VERSION: 1.5 // !LANGUAGE: -JvmRecordSupport // SKIP_TXT diff --git a/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/simpleRecords.fir.kt b/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/simpleRecords.fir.kt index a6cb2cf77b2..3b5cac1279c 100644 --- a/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/simpleRecords.fir.kt +++ b/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/simpleRecords.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport // FILE: MyRecord.java diff --git a/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/simpleRecords.kt b/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/simpleRecords.kt index 8d52377b34f..b824b9f131b 100644 --- a/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/simpleRecords.kt +++ b/compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord/simpleRecords.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport // FILE: MyRecord.java diff --git a/compiler/testData/diagnostics/tests/typealias/privateInFile.fir.kt b/compiler/testData/diagnostics/tests/typealias/privateInFile.fir.kt index 950a76595ee..b4a94971e0f 100644 --- a/compiler/testData/diagnostics/tests/typealias/privateInFile.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/privateInFile.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // FILE: file1.kt private class C { companion object diff --git a/compiler/testData/diagnostics/tests/typealias/privateInFile.kt b/compiler/testData/diagnostics/tests/typealias/privateInFile.kt index 3b72ee3c5b0..22c5cf0f8fc 100644 --- a/compiler/testData/diagnostics/tests/typealias/privateInFile.kt +++ b/compiler/testData/diagnostics/tests/typealias/privateInFile.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // FILE: file1.kt private class C { companion object diff --git a/compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/useBeforeDeclaration.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/useBeforeDeclaration.fir.kt index 590400d94a6..11f0fb11445 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/useBeforeDeclaration.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/useBeforeDeclaration.fir.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !LANGUAGE: +AllowContractsForCustomFunctions +UseReturnsEffect // !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER // !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts diff --git a/compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/useBeforeDeclaration.kt b/compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/useBeforeDeclaration.kt index 1d56dbae622..d2010bd9997 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/useBeforeDeclaration.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/useBeforeDeclaration.kt @@ -1,3 +1,4 @@ +// FIR_IDE_IGNORE // !LANGUAGE: +AllowContractsForCustomFunctions +UseReturnsEffect // !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER // !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt index 17a400998fc..b7c0f841b1e 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt @@ -20,7 +20,6 @@ import org.jetbrains.kotlin.test.MockLibraryUtil import org.jetbrains.kotlin.test.MockLibraryUtil.compileJavaFilesLibraryToJar import org.jetbrains.kotlin.test.TestJavacVersion import org.jetbrains.kotlin.test.TestJdkKind -import org.jetbrains.kotlin.test.directives.ForeignAnnotationsDirectives import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.ALL_JAVA_AS_BINARY import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.ASSERTIONS_MODE @@ -46,8 +45,6 @@ import org.jetbrains.kotlin.test.model.DependencyKind import org.jetbrains.kotlin.test.model.TestFile import org.jetbrains.kotlin.test.model.TestModule import org.jetbrains.kotlin.test.services.* -import org.jetbrains.kotlin.test.services.JUnit5Assertions.assertTrue -import org.jetbrains.kotlin.test.services.configuration.JvmForeignAnnotationsConfigurator.Companion.JSR_305_TEST_ANNOTATIONS_PATH import org.jetbrains.kotlin.test.services.jvm.CompiledClassesManager import org.jetbrains.kotlin.test.services.jvm.compiledClassesManager import org.jetbrains.kotlin.test.util.KtTestUtil @@ -56,7 +53,6 @@ import org.jetbrains.kotlin.utils.PathUtil import org.jetbrains.kotlin.utils.addIfNotNull import java.io.File import kotlin.io.path.ExperimentalPathApi -import kotlin.io.path.createTempDirectory class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfigurator(testServices) { companion object { @@ -100,11 +96,9 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig } } - fun getLibraryFiles(configurationKind: ConfigurationKind, directives: RegisteredDirectives): List { + fun getLibraryFilesExceptRealRuntime(configurationKind: ConfigurationKind, directives: RegisteredDirectives): List { val files = mutableListOf() if (configurationKind.withRuntime) { - files.add(ForTestCompileRuntime.runtimeJarForTests()) - files.add(ForTestCompileRuntime.scriptRuntimeJarForTests()) files.add(ForTestCompileRuntime.kotlinTestJarForTests()) } else if (configurationKind.withMockRuntime) { files.add(ForTestCompileRuntime.minimalRuntimeJarForTests()) @@ -118,6 +112,7 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig if (JvmEnvironmentConfigurationDirectives.STDLIB_JDK8 in directives) { files.add(ForTestCompileRuntime.runtimeJarForTestsWithJdk8()) } + files.add(KtTestUtil.getAnnotationsJar()) return files } } @@ -185,10 +180,17 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig configuration.put(TEST_CONFIGURATION_KIND_KEY, it) } - configuration.addJvmClasspathRoots(getLibraryFiles(configurationKind, module.directives)) + val javaVersionToCompile = registeredDirectives[COMPILE_JAVA_USING].singleOrNull() + val javaBinaryFiles = if (ALL_JAVA_AS_BINARY !in registeredDirectives) { + module.javaFiles.filter { INCLUDE_JAVA_AS_BINARY in it.directives } + } else module.javaFiles + val useJava9ToCompileIncludedJavaFiles = javaVersionToCompile == TestJavacVersion.JAVAC_9 - configuration.addJvmClasspathRoot(KtTestUtil.getAnnotationsJar()) + if (configurationKind.withRuntime) { + configuration.configureStandardLibs(PathUtil.kotlinPathsForDistDirectory, K2JVMCompilerArguments().also { it.noReflect = true }) + } + configuration.addJvmClasspathRoots(getLibraryFilesExceptRealRuntime(configurationKind, module.directives)) val isIr = module.targetBackend?.isIR == true configuration.put(JVMConfigurationKeys.IR, isIr) diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/fir/FirOldFrontendMetaConfigurator.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/fir/FirOldFrontendMetaConfigurator.kt index ff6d7bc49ec..f26bff74cdc 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/fir/FirOldFrontendMetaConfigurator.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/fir/FirOldFrontendMetaConfigurator.kt @@ -14,7 +14,7 @@ import java.io.File class FirOldFrontendMetaConfigurator(testServices: TestServices) : MetaTestConfigurator(testServices) { override fun transformTestDataPath(testDataFileName: String): String { val originalFile = File(testDataFileName) - val isFirIdentical = originalFile.useLines { it.first() == "// ${FirDiagnosticsDirectives.FIR_IDENTICAL.name}" } + val isFirIdentical = originalFile.useLines { lines -> lines.any { it == "// ${FirDiagnosticsDirectives.FIR_IDENTICAL.name}" } } return if (isFirIdentical) { testDataFileName } else { diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/FileUtils.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/FileUtils.kt index aaff8eb6753..b54e94293c6 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/FileUtils.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/FileUtils.kt @@ -5,6 +5,7 @@ package org.jetbrains.kotlin.test.utils +import org.jetbrains.kotlin.test.directives.model.Directive import java.io.File private const val FIR_KT = ".fir.kt" @@ -44,3 +45,13 @@ fun File.withSuffixAndExtension(suffix: String, extension: String): File { fun File.isDirectiveDefined(directive: String): Boolean = this.useLines { line -> line.any { it == directive } } + +fun File.removeDirectiveFromFile(directive: Directive) { + val directiveName = directive.name + val directiveRegexp = "^// $directiveName(:.*)?$(\n)?".toRegex(RegexOption.MULTILINE) + val text = readText() + val directiveRange = directiveRegexp.find(text)?.range + ?: error("Directive $directiveName was not found in $this") + val textWithoutDirective = text.removeRange(directiveRange) + writeText(textWithoutDirective) +} \ No newline at end of file diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/compiler/based/AbstractCompilerBasedTest.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/compiler/based/AbstractCompilerBasedTest.kt index 9c2d7d958f3..60d59db74eb 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/compiler/based/AbstractCompilerBasedTest.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/compiler/based/AbstractCompilerBasedTest.kt @@ -13,6 +13,7 @@ import com.intellij.openapi.roots.LanguageLevelProjectExtension import com.intellij.serviceContainer.ComponentManagerImpl import com.intellij.testFramework.LightProjectDescriptor import org.jetbrains.kotlin.cli.jvm.compiler.MockExternalAnnotationsManager +import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime import org.jetbrains.kotlin.config.LanguageVersionSettings import org.jetbrains.kotlin.idea.caches.project.IdeaModuleInfo import org.jetbrains.kotlin.idea.caches.project.ModuleSourceInfo @@ -181,7 +182,14 @@ abstract class AbstractCompilerBasedTest : KotlinLightCodeInsightFixtureTestCase val configurationKind = JvmEnvironmentConfigurator.extractConfigurationKind(allDirectives) val jdkKind = JvmEnvironmentConfigurator.extractJdkKind(allDirectives) - val libraryFiles = JvmEnvironmentConfigurator.getLibraryFiles(configurationKind, allDirectives) + @OptIn(ExperimentalStdlibApi::class) + val libraryFiles = buildList { + if (configurationKind.withRuntime) { + add(ForTestCompileRuntime.runtimeJarForTests()) + add(ForTestCompileRuntime.scriptRuntimeJarForTests()) + } + addAll(JvmEnvironmentConfigurator.getLibraryFilesExceptRealRuntime(configurationKind, allDirectives)) + } return object : KotlinJdkAndLibraryProjectDescriptor(libraryFiles) { override fun getSdk(): Sdk = PluginTestCaseBase.jdk(jdkKind) diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/compiler/based/FirIdeDirectives.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/compiler/based/FirIdeDirectives.kt new file mode 100644 index 00000000000..859feed7d07 --- /dev/null +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/compiler/based/FirIdeDirectives.kt @@ -0,0 +1,16 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.idea.fir.low.level.api.compiler.based + +import org.jetbrains.kotlin.test.directives.model.SimpleDirectivesContainer +import org.jetbrains.kotlin.test.directives.model.DirectiveApplicability.Global + +object FirIdeDirectives : SimpleDirectivesContainer() { + val FIR_IDE_IGNORE by directive( + description = "Test is ignored in FIR IDE", + applicability = Global + ) +} \ No newline at end of file diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/compiler/based/IdeTestIgnoreHandler.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/compiler/based/IdeTestIgnoreHandler.kt new file mode 100644 index 00000000000..1c5cae1cc74 --- /dev/null +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/compiler/based/IdeTestIgnoreHandler.kt @@ -0,0 +1,60 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.idea.fir.low.level.api.compiler.based + +import org.jetbrains.kotlin.test.model.AfterAnalysisChecker +import org.jetbrains.kotlin.test.directives.FirDiagnosticsDirectives +import org.jetbrains.kotlin.test.services.TestServices +import org.jetbrains.kotlin.test.directives.model.DirectivesContainer +import org.jetbrains.kotlin.test.services.moduleStructure +import org.jetbrains.kotlin.test.utils.removeDirectiveFromFile + +class IdeTestIgnoreHandler(testServices: TestServices) : AfterAnalysisChecker(testServices) { + companion object { + private val isTeamCityBuild: Boolean = System.getenv("TEAMCITY_VERSION") != null + } + + override val directives: List + get() = listOf(FirIdeDirectives) + + override fun check(failedAssertions: List) { + if (!isFirIdeIgnoreDirectivePresent()) return + if (failedAssertions.isNotEmpty()) return + val moduleStructure = testServices.moduleStructure + val testDataFile = testServices.moduleStructure.originalTestDataFiles.first() + + if (!isTeamCityBuild) { + testDataFile.removeDirectiveFromFile(FirIdeDirectives.FIR_IDE_IGNORE) + } + + val message = if (isTeamCityBuild) { + "Please remove // ${FirIdeDirectives.FIR_IDE_IGNORE} from the test source" + } else { + "Removed // ${FirIdeDirectives.FIR_IDE_IGNORE} from the test source" + } + throw TestWithFirIdeIgnoreAnnotationPassesException( + """ + Test pass in FIR IDE + $message + Please re-run the test now + """.trimIndent() + ) + } + + + override fun suppressIfNeeded(failedAssertions: List): List { + return if (isFirIdeIgnoreDirectivePresent()) + failedAssertions.filterIsInstance() + else failedAssertions + } + + private fun isFirIdeIgnoreDirectivePresent(): Boolean { + val moduleStructure = testServices.moduleStructure + return FirIdeDirectives.FIR_IDE_IGNORE in moduleStructure.allDirectives + } +} + +class TestWithFirIdeIgnoreAnnotationPassesException(override val message: String) : IllegalStateException() \ No newline at end of file diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/AbstractDiagnosisCompilerTestDataTest.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/AbstractDiagnosisCompilerTestDataTest.kt index af63ba00e11..61892c95973 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/AbstractDiagnosisCompilerTestDataTest.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/AbstractDiagnosisCompilerTestDataTest.kt @@ -8,9 +8,13 @@ package org.jetbrains.kotlin.idea.fir.low.level.api.diagnostic.compiler.based import org.jetbrains.kotlin.idea.fir.low.level.api.compiler.based.AbstractCompilerBasedTest import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder import org.jetbrains.kotlin.test.runners.baseFirDiagnosticTestConfiguration +import org.jetbrains.kotlin.idea.fir.low.level.api.compiler.based.IdeTestIgnoreHandler abstract class AbstractDiagnosisCompilerTestDataTest : AbstractCompilerBasedTest() { override fun TestConfigurationBuilder.configureTest() { baseFirDiagnosticTestConfiguration() + useAfterAnalysisCheckers( + ::IdeTestIgnoreHandler + ) } } \ No newline at end of file diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerFirTestdataTestGenerated.java b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerFirTestdataTestGenerated.java index 60262c36eae..a20c44c674a 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerFirTestdataTestGenerated.java +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerFirTestdataTestGenerated.java @@ -2791,6 +2791,11 @@ public class DiagnosisCompilerFirTestdataTestGenerated extends AbstractDiagnosis runTest("compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.kt"); } + @TestMetadata("symbolsAndDescriptors.kt") + public void testSymbolsAndDescriptors() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/problems/symbolsAndDescriptors.kt"); + } + @TestMetadata("transform.kt") public void testTransform() throws Exception { runTest("compiler/fir/analysis-tests/testData/resolve/problems/transform.kt"); diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java index 7d28b4499ba..c6a3d609006 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java @@ -4887,6 +4887,133 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/coroutines/callableReference/outsideSuspend.kt"); } } + + @TestMetadata("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SuspendFunctionAsSupertype extends AbstractDiagnosisCompilerTestDataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInSuspendFunctionAsSupertype() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @TestMetadata("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/kSuspendFunctionN") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class KSuspendFunctionN extends AbstractDiagnosisCompilerTestDataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInKSuspendFunctionN() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/kSuspendFunctionN"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @TestMetadata("mixingSuspendAndNonSuspendSupertypes.kt") + public void testMixingSuspendAndNonSuspendSupertypes() throws Exception { + runTest("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/kSuspendFunctionN/mixingSuspendAndNonSuspendSupertypes.kt"); + } + + @TestMetadata("mixingSuspendAndNonSuspendSupertypesThruSuperClass.kt") + public void testMixingSuspendAndNonSuspendSupertypesThruSuperClass() throws Exception { + runTest("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/kSuspendFunctionN/mixingSuspendAndNonSuspendSupertypesThruSuperClass.kt"); + } + + @TestMetadata("mixingSuspendAndNonSuspendSupertypesThruSuperFunInterface.kt") + public void testMixingSuspendAndNonSuspendSupertypesThruSuperFunInterface() throws Exception { + runTest("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/kSuspendFunctionN/mixingSuspendAndNonSuspendSupertypesThruSuperFunInterface.kt"); + } + + @TestMetadata("mixingSuspendAndNonSuspendSupertypesThruSuperinterface.kt") + public void testMixingSuspendAndNonSuspendSupertypesThruSuperinterface() throws Exception { + runTest("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/kSuspendFunctionN/mixingSuspendAndNonSuspendSupertypesThruSuperinterface.kt"); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/kSuspendFunctionN/simple.kt"); + } + } + + @TestMetadata("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/simple") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Simple extends AbstractDiagnosisCompilerTestDataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInSimple() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/simple"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @TestMetadata("mixingSuspendAndNonSuspendSupertypes.kt") + public void testMixingSuspendAndNonSuspendSupertypes() throws Exception { + runTest("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/simple/mixingSuspendAndNonSuspendSupertypes.kt"); + } + + @TestMetadata("mixingSuspendAndNonSuspendSupertypesThruSuperClass.kt") + public void testMixingSuspendAndNonSuspendSupertypesThruSuperClass() throws Exception { + runTest("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/simple/mixingSuspendAndNonSuspendSupertypesThruSuperClass.kt"); + } + + @TestMetadata("mixingSuspendAndNonSuspendSupertypesThruSuperFunInterface.kt") + public void testMixingSuspendAndNonSuspendSupertypesThruSuperFunInterface() throws Exception { + runTest("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/simple/mixingSuspendAndNonSuspendSupertypesThruSuperFunInterface.kt"); + } + + @TestMetadata("mixingSuspendAndNonSuspendSupertypesThruSuperinterface.kt") + public void testMixingSuspendAndNonSuspendSupertypesThruSuperinterface() throws Exception { + runTest("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/simple/mixingSuspendAndNonSuspendSupertypesThruSuperinterface.kt"); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/simple/simple.kt"); + } + } + + @TestMetadata("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/suspendFunctionN") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SuspendFunctionN extends AbstractDiagnosisCompilerTestDataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInSuspendFunctionN() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/suspendFunctionN"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @TestMetadata("mixingSuspendAndNonSuspendSupertypes.kt") + public void testMixingSuspendAndNonSuspendSupertypes() throws Exception { + runTest("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/suspendFunctionN/mixingSuspendAndNonSuspendSupertypes.kt"); + } + + @TestMetadata("mixingSuspendAndNonSuspendSupertypesThruSuperClass.kt") + public void testMixingSuspendAndNonSuspendSupertypesThruSuperClass() throws Exception { + runTest("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/suspendFunctionN/mixingSuspendAndNonSuspendSupertypesThruSuperClass.kt"); + } + + @TestMetadata("mixingSuspendAndNonSuspendSupertypesThruSuperFunInterface.kt") + public void testMixingSuspendAndNonSuspendSupertypesThruSuperFunInterface() throws Exception { + runTest("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/suspendFunctionN/mixingSuspendAndNonSuspendSupertypesThruSuperFunInterface.kt"); + } + + @TestMetadata("mixingSuspendAndNonSuspendSupertypesThruSuperinterface.kt") + public void testMixingSuspendAndNonSuspendSupertypesThruSuperinterface() throws Exception { + runTest("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/suspendFunctionN/mixingSuspendAndNonSuspendSupertypesThruSuperinterface.kt"); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/suspendFunctionN/simple.kt"); + } + } + } } @TestMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy") @@ -10824,6 +10951,11 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/inference/violatingUpperBoundForSelfType.kt"); } + @TestMetadata("violatingUpperBoundForSelfTypeError.kt") + public void testViolatingUpperBoundForSelfTypeError() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/violatingUpperBoundForSelfTypeError.kt"); + } + @TestMetadata("compiler/testData/diagnostics/tests/inference/builderInference") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -14569,6 +14701,11 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/java8Overrides/abstractBaseClassMemberNotImplemented.kt"); } + @TestMetadata("abstractBaseClassMemberNotImplemented_15.kt") + public void testAbstractBaseClassMemberNotImplemented_15() throws Exception { + runTest("compiler/testData/diagnostics/tests/java8Overrides/abstractBaseClassMemberNotImplemented_15.kt"); + } + @TestMetadata("abstractVsAbstract.kt") public void testAbstractVsAbstract() throws Exception { runTest("compiler/testData/diagnostics/tests/java8Overrides/abstractVsAbstract.kt"); @@ -14593,6 +14730,11 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/java8Overrides/implementingMethodOfAny.kt"); } + @TestMetadata("kt45508.kt") + public void testKt45508() throws Exception { + runTest("compiler/testData/diagnostics/tests/java8Overrides/kt45508.kt"); + } + @TestMetadata("notAMethodOfAny.kt") public void testNotAMethodOfAny() throws Exception { runTest("compiler/testData/diagnostics/tests/java8Overrides/notAMethodOfAny.kt"); @@ -18391,6 +18533,16 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/arrays.kt"); } + @TestMetadata("dontSubstituteAnotherErasedRecursiveTypeArgumentAndNonRecursive.kt") + public void testDontSubstituteAnotherErasedRecursiveTypeArgumentAndNonRecursive() throws Exception { + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedRecursiveTypeArgumentAndNonRecursive.kt"); + } + + @TestMetadata("dontSubstituteAnotherErasedTypeArgumentIfRecursive.kt") + public void testDontSubstituteAnotherErasedTypeArgumentIfRecursive() throws Exception { + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/dontSubstituteAnotherErasedTypeArgumentIfRecursive.kt"); + } + @TestMetadata("errorType.kt") public void testErrorType() throws Exception { runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/errorType.kt"); @@ -18466,6 +18618,26 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/starProjectionToRaw.kt"); } + @TestMetadata("substituteAnotherErasedTypeArgument.kt") + public void testSubstituteAnotherErasedTypeArgument() throws Exception { + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteAnotherErasedTypeArgument.kt"); + } + + @TestMetadata("substituteOtherErasedDeepTypeArguments.kt") + public void testSubstituteOtherErasedDeepTypeArguments() throws Exception { + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteOtherErasedDeepTypeArguments.kt"); + } + + @TestMetadata("substituteSeveralOtherErasedDependentTypeArguments.kt") + public void testSubstituteSeveralOtherErasedDependentTypeArguments() throws Exception { + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedDependentTypeArguments.kt"); + } + + @TestMetadata("substituteSeveralOtherErasedTypeArguments.kt") + public void testSubstituteSeveralOtherErasedTypeArguments() throws Exception { + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/substituteSeveralOtherErasedTypeArguments.kt"); + } + @TestMetadata("typeEnhancement.kt") public void testTypeEnhancement() throws Exception { runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.kt"); @@ -25394,6 +25566,11 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/typeParameters/kt42042.kt"); } + @TestMetadata("kt42042Error.kt") + public void testKt42042Error() throws Exception { + runTest("compiler/testData/diagnostics/tests/typeParameters/kt42042Error.kt"); + } + @TestMetadata("kt42396.kt") public void testKt42396() throws Exception { runTest("compiler/testData/diagnostics/tests/typeParameters/kt42396.kt");