Add test reproducing KT-49087 and KT-49069

This commit is contained in:
Mikhail Glukhikh
2021-10-06 10:47:54 +03:00
committed by teamcityserver
parent d0a70e5cc0
commit 39fe457f91
5 changed files with 69 additions and 0 deletions
@@ -4018,6 +4018,12 @@ public class DiagnosisCompilerFirTestdataTestGenerated extends AbstractDiagnosis
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
}
@Test
@TestMetadata("annotationUseSites.kt")
public void testAnnotationUseSites() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/annotationUseSites.kt");
}
@Test
@TestMetadata("arrayFilterCapturedType.kt")
public void testArrayFilterCapturedType() throws Exception {
@@ -0,0 +1,38 @@
FILE: test.kt
@R|kotlin/annotation/Target|(allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.VALUE_PARAMETER|, Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.PROPERTY_GETTER|, Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.PROPERTY_SETTER|, Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.CONSTRUCTOR|)) public final annotation class KotlinMessage : R|kotlin/Annotation| {
public constructor(): R|KotlinMessage| {
super<R|kotlin/Any|>()
}
}
public final data class KotlinResult : R|kotlin/Any| {
@R|KotlinMessage|() public constructor(@PROPERTY_GETTER:R|KotlinMessage|() @R|KotlinMessage|() message: R|kotlin/String| = String()): R|KotlinResult| {
super<R|kotlin/Any|>()
}
@PROPERTY_GETTER:R|KotlinMessage|() @R|KotlinMessage|() public final val message: R|kotlin/String| = R|<local>/message|
public get(): R|kotlin/String|
public final operator fun component1(): R|kotlin/String|
public final fun copy(message: R|kotlin/String| = this@R|/KotlinResult|.R|/KotlinResult.message|): R|KotlinResult|
}
public open class Some : R|kotlin/Any| {
public constructor(): R|Some| {
super<R|kotlin/Any|>()
}
public final companion object Companion : R|kotlin/Any| {
private constructor(): R|Some.Companion| {
super<R|kotlin/Any|>()
}
@PROPERTY_GETTER:R|kotlin/jvm/JvmName|(name = String(getInstance)) public open val INSTANCE: R|kotlin/String|
public get(): R|kotlin/String| {
^ String(Omega)
}
}
}
@@ -0,0 +1,13 @@
// FILE: test.kt
@Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.CONSTRUCTOR)
annotation class KotlinMessage
data class KotlinResult @KotlinMessage constructor(@get:KotlinMessage <!REPEATED_ANNOTATION!>@KotlinMessage<!> val message: String = "")
open class Some {
companion object {
<!INAPPLICABLE_JVM_NAME!>@get:JvmName("getInstance")<!>
<!NON_FINAL_MEMBER_IN_OBJECT!>open<!> val INSTANCE: String
get() = "Omega"
}
}
@@ -4018,6 +4018,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
}
@Test
@TestMetadata("annotationUseSites.kt")
public void testAnnotationUseSites() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/annotationUseSites.kt");
}
@Test
@TestMetadata("arrayFilterCapturedType.kt")
public void testArrayFilterCapturedType() throws Exception {
@@ -4018,6 +4018,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
}
@Test
@TestMetadata("annotationUseSites.kt")
public void testAnnotationUseSites() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/annotationUseSites.kt");
}
@Test
@TestMetadata("arrayFilterCapturedType.kt")
public void testArrayFilterCapturedType() throws Exception {