K2: reproduce KT-61691
This commit is contained in:
committed by
Space Team
parent
aacfc31c90
commit
91aa679214
+6
@@ -1506,6 +1506,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedBlock.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("AnnotatedCatchValueParameter.kt")
|
||||
public void testAnnotatedCatchValueParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedCatchValueParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("AnnotatedConstructor.kt")
|
||||
public void testAnnotatedConstructor() throws Exception {
|
||||
|
||||
+6
@@ -1506,6 +1506,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedBlock.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("AnnotatedCatchValueParameter.kt")
|
||||
public void testAnnotatedCatchValueParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedCatchValueParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("AnnotatedConstructor.kt")
|
||||
public void testAnnotatedConstructor() throws Exception {
|
||||
|
||||
+6
@@ -1506,6 +1506,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedBlock.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("AnnotatedCatchValueParameter.kt")
|
||||
public void testAnnotatedCatchValueParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedCatchValueParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("AnnotatedConstructor.kt")
|
||||
public void testAnnotatedConstructor() throws Exception {
|
||||
|
||||
+6
@@ -1506,6 +1506,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedBlock.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("AnnotatedCatchValueParameter.kt")
|
||||
public void testAnnotatedCatchValueParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedCatchValueParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("AnnotatedConstructor.kt")
|
||||
public void testAnnotatedConstructor() throws Exception {
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// WITH_STDLIB
|
||||
// ISSUE: KT-61691
|
||||
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER)
|
||||
annotation class FixCatchValueParameter
|
||||
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Target(AnnotationTarget.LOCAL_VARIABLE)
|
||||
annotation class FixCatchLocalVariable
|
||||
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
annotation class FixCatchClass
|
||||
|
||||
fun main() {
|
||||
try {
|
||||
|
||||
} catch (@FixCatchLocalVariable <!WRONG_ANNOTATION_TARGET!>@FixCatchValueParameter<!> <!WRONG_ANNOTATION_TARGET!>@FixCatchClass<!> e: Throwable) {
|
||||
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// WITH_STDLIB
|
||||
// ISSUE: KT-61691
|
||||
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER)
|
||||
annotation class FixCatchValueParameter
|
||||
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Target(AnnotationTarget.LOCAL_VARIABLE)
|
||||
annotation class FixCatchLocalVariable
|
||||
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
annotation class FixCatchClass
|
||||
|
||||
fun main() {
|
||||
try {
|
||||
|
||||
} catch (@FixCatchLocalVariable @FixCatchValueParameter @FixCatchClass e: Throwable) {
|
||||
|
||||
}
|
||||
}
|
||||
Generated
+6
@@ -1506,6 +1506,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedBlock.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("AnnotatedCatchValueParameter.kt")
|
||||
public void testAnnotatedCatchValueParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedCatchValueParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("AnnotatedConstructor.kt")
|
||||
public void testAnnotatedConstructor() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user