Skip to content

Commit a092263

Browse files
kotlin tests: sync generated-throws.kt source between test-kotlin1 and test-kotlin2
Remove the K1-only comment '// This doesn't generate a throw statement in Kotlin 1 mode' from test-kotlin1/library-tests/generated-throws/generated-throws.kt so the source files are byte-identical between the two suites. The expected outputs still legitimately differ: in K2 mode the compiler generates an implicit throw NoWhenBranchMatchedException for the exhaustive sealed-class when expression, but the K1 frontend does not emit this node. This is a mode-specific behaviour difference that cannot be bridged by an extractor change. Both tests continue to pass: - test-kotlin1 (kotlinc 2.3.20 / -language 1.9): 0 throw results (unchanged) - test-kotlin2 (kotlinc 2.4.0 / -language 2.0): 1 throw result (unchanged) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d941557 commit a092263

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

java/ql/test-kotlin1/library-tests/generated-throws/generated-throws.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ interface Bar: Foo {}
44
interface Baz: Foo {}
55

66
private fun someFun(v: Foo) {
7-
// This doesn't generate a throw statement in Kotlin 1 mode
87
when (v) {
98
is Bar -> {}
109
is Baz -> {}

0 commit comments

Comments
 (0)