Skip to content

Commit a63b501

Browse files
KvanTTTSpace Team
authored andcommitted
[Test] Test with confusing UNRESOLVED_REFERENCE on super type constructor call
to expect class without an implicit default constructor
1 parent 356fa91 commit a63b501

File tree

6 files changed

+99
-0
lines changed

6 files changed

+99
-0
lines changed

analysis/low-level-api-fir/tests-gen/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLDiagnosticsFe10TestGenerated.java

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

analysis/low-level-api-fir/tests-gen/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLPartialDiagnosticsFe10TestGenerated.java

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

analysis/low-level-api-fir/tests-gen/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLReversedDiagnosticsFe10TestGenerated.java

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// ISSUE: KT-20677
2+
// RUN_PIPELINE_TILL: FRONTEND
3+
// IGNORE_FIR_DIAGNOSTICS
4+
// MODULE: m1-common
5+
6+
<!NO_ACTUAL_FOR_EXPECT{JVM}!>expect<!> open class A
7+
8+
class C : <!UNRESOLVED_REFERENCE!>A<!>() {
9+
fun f() {
10+
<!EXPECT_CLASS_AS_FUNCTION!>A<!>()
11+
}
12+
}
13+
14+
<!NO_ACTUAL_FOR_EXPECT{JVM}!>expect<!> interface I
15+
16+
// Make sure the diagnostic for interfaces is preserved, it has another kind
17+
class E : I<!NO_CONSTRUCTOR!>()<!>
18+
19+
// MODULE: m1-jvm()()(m1-common)
20+
21+
class D : <!UNRESOLVED_REFERENCE!>A<!>() {
22+
fun g() {
23+
<!EXPECT_CLASS_AS_FUNCTION!>A<!>()
24+
}
25+
}
26+
27+
/* GENERATED_FIR_TAGS: annotationDeclaration, expect, functionDeclaration */
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// ISSUE: KT-20677
2+
// RUN_PIPELINE_TILL: FRONTEND
3+
// IGNORE_FIR_DIAGNOSTICS
4+
// MODULE: m1-common
5+
6+
expect open class <!NO_ACTUAL_FOR_EXPECT{JVM}!>A<!>
7+
8+
class C : A<!NO_CONSTRUCTOR, NO_CONSTRUCTOR{JVM}!>()<!> {
9+
fun f() {
10+
<!RESOLUTION_TO_CLASSIFIER, RESOLUTION_TO_CLASSIFIER{JVM}!>A<!>()
11+
}
12+
}
13+
14+
expect interface <!NO_ACTUAL_FOR_EXPECT{JVM}!>I<!>
15+
16+
// Make sure the diagnostic for interfaces is preserved, it has another kind
17+
class E : I<!NO_CONSTRUCTOR, NO_CONSTRUCTOR{JVM}!>()<!>
18+
19+
// MODULE: m1-jvm()()(m1-common)
20+
21+
class D : A<!NO_CONSTRUCTOR!>()<!> {
22+
fun g() {
23+
<!RESOLUTION_TO_CLASSIFIER!>A<!>()
24+
}
25+
}
26+
27+
/* GENERATED_FIR_TAGS: annotationDeclaration, expect, functionDeclaration */
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// ISSUE: KT-20677
2+
// RUN_PIPELINE_TILL: FRONTEND
3+
// IGNORE_FIR_DIAGNOSTICS
4+
// MODULE: m1-common
5+
6+
expect open class A
7+
8+
class C : <!UNRESOLVED_REFERENCE!>A<!>() {
9+
fun f() {
10+
<!EXPECT_CLASS_AS_FUNCTION!>A<!>()
11+
}
12+
}
13+
14+
expect interface I
15+
16+
// Make sure the diagnostic for interfaces is preserved, it has another kind
17+
class E : I<!NO_CONSTRUCTOR!>()<!>
18+
19+
// MODULE: m1-jvm()()(m1-common)
20+
21+
class D : <!UNRESOLVED_REFERENCE!>A<!>() {
22+
fun g() {
23+
<!EXPECT_CLASS_AS_FUNCTION!>A<!>()
24+
}
25+
}
26+
27+
/* GENERATED_FIR_TAGS: annotationDeclaration, expect, functionDeclaration */

0 commit comments

Comments
 (0)