K1/K2: add tests for KT-58767

This commit is contained in:
Anastasia.Nekrasova
2023-12-21 11:28:10 +02:00
committed by Space Team
parent 6268cfedab
commit 19fe605a3e
7 changed files with 48 additions and 0 deletions
@@ -41919,6 +41919,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/NotApiMarkerAsArgument.kt");
}
@Test
@TestMetadata("Typealias.kt")
public void testTypealias() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/Typealias.kt");
}
@Test
@TestMetadata("UsageOptInIsNotImplied.kt")
public void testUsageOptInIsNotImplied() throws Exception {
@@ -41919,6 +41919,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/NotApiMarkerAsArgument.kt");
}
@Test
@TestMetadata("Typealias.kt")
public void testTypealias() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/Typealias.kt");
}
@Test
@TestMetadata("UsageOptInIsNotImplied.kt")
public void testUsageOptInIsNotImplied() throws Exception {
@@ -39645,6 +39645,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/NotApiMarkerAsArgument.kt");
}
@Test
@TestMetadata("Typealias.kt")
public void testTypealias() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/Typealias.kt");
}
@Test
@TestMetadata("UsageOptInIsNotImplied.kt")
public void testUsageOptInIsNotImplied() throws Exception {
@@ -39765,6 +39765,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/NotApiMarkerAsArgument.kt");
}
@Test
@TestMetadata("Typealias.kt")
public void testTypealias() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/Typealias.kt");
}
@Test
@TestMetadata("UsageOptInIsNotImplied.kt")
public void testUsageOptInIsNotImplied() throws Exception {
@@ -0,0 +1,9 @@
@RequiresOptIn
annotation class ApiMarker
@SubclassOptInRequired(ApiMarker::class)
interface Interface
typealias TypeAlias = Interface
class InterfaceInheritorB: <!OPT_IN_USAGE_ERROR!>TypeAlias<!>
@@ -0,0 +1,9 @@
@RequiresOptIn
annotation class ApiMarker
@SubclassOptInRequired(ApiMarker::class)
interface Interface
typealias TypeAlias = Interface
class InterfaceInheritorB: TypeAlias
@@ -41919,6 +41919,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/NotApiMarkerAsArgument.kt");
}
@Test
@TestMetadata("Typealias.kt")
public void testTypealias() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/subclassOptInRequired/Typealias.kt");
}
@Test
@TestMetadata("UsageOptInIsNotImplied.kt")
public void testUsageOptInIsNotImplied() throws Exception {