Skip to content

Commit 982a4ef

Browse files
lunakolySpace Team
authored and
Space Team
committed
[FIR] Reproduce ^KT-75578
(cherry picked from commit 7d86aa5)
1 parent 173e94a commit 982a4ef

File tree

8 files changed

+110
-0
lines changed

8 files changed

+110
-0
lines changed

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

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsWithLatestLanguageVersionTestGenerated.java

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/PhasedJvmDiagnosticLightTreeTestGenerated.java

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/PhasedJvmDiagnosticPsiTestGenerated.java

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// RUN_PIPELINE_TILL: BACKEND
2+
// ISSUE: KT-75578
3+
// WITH_STDLIB
4+
5+
interface I {
6+
fun foo(p1: Int, p2: Int = 0): String
7+
}
8+
9+
open class A : I {
10+
override fun foo(p1: Int, p2: Int): String = "A::foo $p1 $p2"
11+
}
12+
13+
class B : A() {
14+
override fun foo(p1: Int, p2: Int): String = "B::foo $p1 $p2"
15+
16+
fun bar() = listOf(
17+
super.foo(1, 2),
18+
super.foo(1),
19+
foo(1, 2),
20+
foo(1),
21+
)
22+
}
23+
24+
fun box(): String {
25+
val expected = listOf(
26+
"A::foo 1 2",
27+
"A::foo 1 0",
28+
"B::foo 1 2",
29+
"B::foo 1 0",
30+
)
31+
val actual = B().bar()
32+
33+
return when {
34+
B().bar() != expected -> "expected: $expected, but was: $actual"
35+
else -> "OK"
36+
}
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// RUN_PIPELINE_TILL: BACKEND
2+
// ISSUE: KT-75578
3+
// WITH_STDLIB
4+
5+
interface I {
6+
fun foo(p1: Int, p2: Int = 0): String
7+
}
8+
9+
open class A : I {
10+
override fun foo(p1: Int, p2: Int): String = "A::foo $p1 $p2"
11+
}
12+
13+
class B : A() {
14+
override fun foo(p1: Int, p2: Int): String = "B::foo $p1 $p2"
15+
16+
fun bar() = listOf(
17+
super.foo(1, 2),
18+
super.<!SUPER_CALL_WITH_DEFAULT_PARAMETERS!>foo<!>(1),
19+
foo(1, 2),
20+
foo(1),
21+
)
22+
}
23+
24+
fun box(): String {
25+
val expected = listOf(
26+
"A::foo 1 2",
27+
"A::foo 1 0",
28+
"B::foo 1 2",
29+
"B::foo 1 0",
30+
)
31+
val actual = B().bar()
32+
33+
return when {
34+
B().bar() != expected -> "expected: $expected, but was: $actual"
35+
else -> "OK"
36+
}
37+
}

compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)