add tests on implicit type with inaccessible annotations
^KT-63042
This commit is contained in:
committed by
Space Team
parent
80fcf9b09e
commit
a25bac4bf9
+6
@@ -3053,6 +3053,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/typeUse"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("implicitTypeWithInaccessibleAnnotation.kt")
|
||||
public void testImplicitTypeWithInaccessibleAnnotation() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/implicitTypeWithInaccessibleAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt19455.kt")
|
||||
public void testKt19455() throws Exception {
|
||||
|
||||
+6
@@ -3059,6 +3059,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/typeUse"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("implicitTypeWithInaccessibleAnnotation.kt")
|
||||
public void testImplicitTypeWithInaccessibleAnnotation() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/implicitTypeWithInaccessibleAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt19455.kt")
|
||||
public void testKt19455() throws Exception {
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package usage
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno(val s: String)
|
||||
|
||||
fun implicitType1() = TopLevelObject.expectedType()
|
||||
|
||||
object TopLevelObject {
|
||||
fun expectedType2(): @Anno(privateConstVal) Int = 4
|
||||
private const val privateConstVal = "privateConstVal"
|
||||
fun expectedType(): @Anno(<!UNRESOLVED_REFERENCE!>privateConstVal<!>) Int = 4
|
||||
}
|
||||
|
||||
fun implicitType2() = TopLevelObject.expectedType2()
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
package usage
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno(val s: String)
|
||||
|
||||
fun implicitType1() = TopLevelObject.expectedType()
|
||||
|
||||
object TopLevelObject {
|
||||
fun expectedType2(): @Anno(privateConstVal) Int = 4
|
||||
private const val privateConstVal = "privateConstVal"
|
||||
fun expectedType(): @Anno(privateConstVal) Int = 4
|
||||
}
|
||||
|
||||
fun implicitType2() = TopLevelObject.expectedType2()
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package usage
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno(val s: String)
|
||||
|
||||
fun implicitType1() = TopLevelObject.expectedType()
|
||||
|
||||
object TopLevelObject {
|
||||
fun expectedType2(): @Anno(<!UNRESOLVED_REFERENCE!>privateConstVal<!>) Int = 4
|
||||
private const val privateConstVal = "privateConstVal"
|
||||
fun expectedType(): @Anno(privateConstVal) Int = 4
|
||||
}
|
||||
|
||||
fun implicitType2() = TopLevelObject.expectedType2()
|
||||
Generated
+6
@@ -3059,6 +3059,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/typeUse"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("implicitTypeWithInaccessibleAnnotation.kt")
|
||||
public void testImplicitTypeWithInaccessibleAnnotation() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/implicitTypeWithInaccessibleAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt19455.kt")
|
||||
public void testKt19455() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user