Add test for KT-51499 (occurs in FE10, already fixed in FIR)
This commit is contained in:
+6
@@ -36548,6 +36548,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalSetter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fileOptInSuppressesOverride.kt")
|
||||
public void testFileOptInSuppressesOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/fileOptInSuppressesOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fullFqNameUsage.kt")
|
||||
public void testFullFqNameUsage() throws Exception {
|
||||
|
||||
+6
@@ -36548,6 +36548,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalSetter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fileOptInSuppressesOverride.kt")
|
||||
public void testFileOptInSuppressesOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/fileOptInSuppressesOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fullFqNameUsage.kt")
|
||||
public void testFullFqNameUsage() throws Exception {
|
||||
|
||||
+6
@@ -36548,6 +36548,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalSetter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fileOptInSuppressesOverride.kt")
|
||||
public void testFileOptInSuppressesOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/fileOptInSuppressesOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fullFqNameUsage.kt")
|
||||
public void testFullFqNameUsage() throws Exception {
|
||||
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
@file:OptIn(Marker::class)
|
||||
|
||||
@RequiresOptIn
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
|
||||
annotation class Marker
|
||||
|
||||
@Marker
|
||||
fun experimental() {}
|
||||
|
||||
interface MyInterface {
|
||||
fun execute()
|
||||
}
|
||||
|
||||
class MyClass : MyInterface {
|
||||
override fun execute() = experimental()
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
@file:OptIn(Marker::class)
|
||||
|
||||
@RequiresOptIn
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
|
||||
annotation class Marker
|
||||
|
||||
@Marker
|
||||
fun experimental() {}
|
||||
|
||||
interface MyInterface {
|
||||
fun execute()
|
||||
}
|
||||
|
||||
class MyClass : MyInterface {
|
||||
override fun execute() = <!OPT_IN_USAGE_ERROR!>experimental<!>()
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package
|
||||
|
||||
@Marker public fun experimental(): kotlin.Unit
|
||||
|
||||
@kotlin.RequiresOptIn @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.FUNCTION}) public final annotation class Marker : kotlin.Annotation {
|
||||
public constructor Marker()
|
||||
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 final class MyClass : MyInterface {
|
||||
public constructor MyClass()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ fun execute(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface MyInterface {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public abstract fun execute(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Generated
+6
@@ -36638,6 +36638,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalSetter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fileOptInSuppressesOverride.kt")
|
||||
public void testFileOptInSuppressesOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/fileOptInSuppressesOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fullFqNameUsage.kt")
|
||||
public void testFullFqNameUsage() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user