Skip to content

Commit fec4e33

Browse files
vsukharevSpace Team
authored andcommitted
[Tests] Add reproducer for KT-80226
^KT-80226
1 parent 4f0ad44 commit fec4e33

File tree

10 files changed

+180
-0
lines changed

10 files changed

+180
-0
lines changed

compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenTestGenerated.java

Lines changed: 18 additions & 0 deletions
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,18 @@
1+
// ISSUE: KT-80226
2+
// IGNORE_BACKEND: NATIVE, JS_IR, WASM
3+
// IGNORE_KLIB_SYNTHETIC_ACCESSORS_CHECKS: NATIVE, JS_IR, WASM
4+
// ^^^KT-80226: ClassCastException: class IrSimpleFunctionSymbolImpl cannot be cast to class IrConstructorSymbol
5+
6+
// FILE: lib.kt
7+
open class A(val x: Long) {
8+
private constructor(x: Int): this(x.toLong())
9+
10+
internal inline fun plus1() = object : A(x.toInt() + 1) {}
11+
}
12+
13+
// FILE: main.kt
14+
fun box(): String {
15+
val result = A(1).plus1().x
16+
if (result != 2L) return result.toString()
17+
return "OK"
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// ISSUE: KT-80226
2+
// IGNORE_BACKEND: NATIVE, JS_IR, WASM
3+
// IGNORE_KLIB_SYNTHETIC_ACCESSORS_CHECKS: NATIVE, JS_IR, WASM
4+
// ^^^KT-80226: ClassCastException: class IrSimpleFunctionSymbolImpl cannot be cast to class IrConstructorSymbol
5+
6+
// MODULE: lib
7+
// FILE: lib.kt
8+
open class A(val x: Long) {
9+
private constructor(x: Int): this(x.toLong())
10+
11+
internal inline fun plus1() = object : A(x.toInt() + 1) {}
12+
}
13+
14+
// MODULE: main()(lib)
15+
// FILE: main.kt
16+
fun box(): String {
17+
val result = A(1).plus1().x
18+
if (result != 2L) return result.toString()
19+
return "OK"
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// ISSUE: KT-80226
2+
// IGNORE_BACKEND: NATIVE, JS_IR, WASM
3+
// IGNORE_KLIB_SYNTHETIC_ACCESSORS_CHECKS: NATIVE, JS_IR, WASM
4+
// ^^^KT-80226: ClassCastException: class IrSimpleFunctionSymbolImpl cannot be cast to class IrConstructorSymbol
5+
6+
open class A(val x: Long) {
7+
private constructor(x: Int): this(x.toLong())
8+
9+
internal inline fun plus1() = object : A(x.toInt() + 1) {}
10+
}
11+
12+
fun box(): String {
13+
val result = A(1).plus1().x
14+
if (result != 2L) return result.toString()
15+
return "OK"
16+
}

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

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

js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsKlibSyntheticAccessorTestGenerated.java

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

js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsKlibSyntheticAccessorsBoxTestGenerated.java

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

native/native.tests/klib-ir-inliner/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeKlibSyntheticAccessorsBoxTestGenerated.java

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

native/native.tests/klib-ir-inliner/tests-gen/org/jetbrains/kotlin/konan/test/syntheticAccessors/NativeKlibSyntheticAccessorTestGenerated.java

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

wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/WasmJsSynthAccBoxTestGenerated.java

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

0 commit comments

Comments
 (0)