diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/strictfpOnClass.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/strictfpOnClass.kt new file mode 100644 index 00000000000..3424a976dc5 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/strictfpOnClass.kt @@ -0,0 +1,11 @@ +@kotlin.jvm.Strictfp class A { + +} + +@kotlin.jvm.Strictfp object B { + +} + +@kotlin.jvm.Strictfp interface C { + +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/strictfpOnClass.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/strictfpOnClass.txt new file mode 100644 index 00000000000..f80355a1167 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/strictfpOnClass.txt @@ -0,0 +1,21 @@ +package + +@kotlin.jvm.Strictfp() public final class A { + public constructor A() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +@kotlin.jvm.Strictfp() public object B { + private constructor B() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +@kotlin.jvm.Strictfp() public interface C { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java index 206bdc0e5fd..77e75d7a791 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java @@ -193,6 +193,12 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW doTest(fileName); } + @TestMetadata("strictfpOnClass.kt") + public void testStrictfpOnClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/strictfpOnClass.kt"); + doTest(fileName); + } + @TestMetadata("Synchronized.kt") public void testSynchronized() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/Synchronized.kt"); diff --git a/core/runtime.jvm/src/kotlin/jvm/annotations/JvmFlagAnnotations.kt b/core/runtime.jvm/src/kotlin/jvm/annotations/JvmFlagAnnotations.kt index fcd5c1bf32a..7ab39d9f8b4 100644 --- a/core/runtime.jvm/src/kotlin/jvm/annotations/JvmFlagAnnotations.kt +++ b/core/runtime.jvm/src/kotlin/jvm/annotations/JvmFlagAnnotations.kt @@ -41,7 +41,7 @@ annotation class Transient * of floating point operations performed inside the method needs to be restricted in order to * achieve better portability. */ -@Target(FUNCTION, CONSTRUCTOR, PROPERTY_GETTER, PROPERTY_SETTER, CLASS) +@Target(FUNCTION, CONSTRUCTOR, PROPERTY_GETTER, PROPERTY_SETTER) @Retention(AnnotationRetention.SOURCE) @MustBeDocumented annotation class Strictfp