K1/K2: add tests for KT-55811
This commit is contained in:
committed by
Space Team
parent
5150812838
commit
867be40c8e
+18
@@ -41913,6 +41913,24 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/InheritingDifferentOptInLevels.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InnerAndNestedClasses.kt")
|
||||
public void testInnerAndNestedClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/InnerAndNestedClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InnerClasses.kt")
|
||||
public void testInnerClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/InnerClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("NestedClasses.kt")
|
||||
public void testNestedClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/NestedClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("NotApiMarkerAsArgument.kt")
|
||||
public void testNotApiMarkerAsArgument() throws Exception {
|
||||
|
||||
+18
@@ -41913,6 +41913,24 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/InheritingDifferentOptInLevels.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InnerAndNestedClasses.kt")
|
||||
public void testInnerAndNestedClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/InnerAndNestedClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InnerClasses.kt")
|
||||
public void testInnerClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/InnerClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("NestedClasses.kt")
|
||||
public void testNestedClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/NestedClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("NotApiMarkerAsArgument.kt")
|
||||
public void testNotApiMarkerAsArgument() throws Exception {
|
||||
|
||||
+18
@@ -39639,6 +39639,24 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/InheritingDifferentOptInLevels.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InnerAndNestedClasses.kt")
|
||||
public void testInnerAndNestedClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/InnerAndNestedClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InnerClasses.kt")
|
||||
public void testInnerClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/InnerClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("NestedClasses.kt")
|
||||
public void testNestedClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/NestedClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("NotApiMarkerAsArgument.kt")
|
||||
public void testNotApiMarkerAsArgument() throws Exception {
|
||||
|
||||
+18
@@ -39759,6 +39759,24 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/InheritingDifferentOptInLevels.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InnerAndNestedClasses.kt")
|
||||
public void testInnerAndNestedClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/InnerAndNestedClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InnerClasses.kt")
|
||||
public void testInnerClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/InnerClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("NestedClasses.kt")
|
||||
public void testNestedClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/NestedClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("NotApiMarkerAsArgument.kt")
|
||||
public void testNotApiMarkerAsArgument() throws Exception {
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// FIR_IDENTICAL
|
||||
|
||||
@RequiresOptIn
|
||||
annotation class Api
|
||||
|
||||
@SubclassOptInRequired(Api::class)
|
||||
open class B {
|
||||
open class C
|
||||
open inner class L
|
||||
}
|
||||
|
||||
class E() : <!OPT_IN_USAGE_ERROR!>B<!>()
|
||||
class K() : B.C()
|
||||
|
||||
fun test() {
|
||||
with(B()) {
|
||||
class Local : B.L()
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
// FIR_IDENTICAL
|
||||
|
||||
@RequiresOptIn
|
||||
annotation class Boom
|
||||
|
||||
@RequiresOptIn
|
||||
annotation class Boom2
|
||||
|
||||
@SubclassOptInRequired(Boom::class)
|
||||
open class B {
|
||||
@SubclassOptInRequired(Boom2::class)
|
||||
open inner class C
|
||||
}
|
||||
|
||||
|
||||
fun test() {
|
||||
with(B()) {
|
||||
@OptIn(Boom2::class)
|
||||
class Local : B.C() {}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// FIR_IDENTICAL
|
||||
|
||||
@RequiresOptIn
|
||||
annotation class Boom
|
||||
|
||||
@RequiresOptIn
|
||||
annotation class Boom2
|
||||
|
||||
@SubclassOptInRequired(Boom::class)
|
||||
open class B {
|
||||
@SubclassOptInRequired(Boom2::class)
|
||||
open class C
|
||||
|
||||
@OptIn(Boom2::class)
|
||||
class C2 : C()
|
||||
}
|
||||
|
||||
@OptIn(Boom2::class)
|
||||
class E2 : B.C() {}
|
||||
Generated
+18
@@ -41913,6 +41913,24 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/InheritingDifferentOptInLevels.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InnerAndNestedClasses.kt")
|
||||
public void testInnerAndNestedClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/InnerAndNestedClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InnerClasses.kt")
|
||||
public void testInnerClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/InnerClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("NestedClasses.kt")
|
||||
public void testNestedClasses() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/NestedClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("NotApiMarkerAsArgument.kt")
|
||||
public void testNotApiMarkerAsArgument() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user