[K/N][Tests] Move some codegen tests to new infra: annotations..coroutines

^KT-61259
This commit is contained in:
Vladimir Sukharev
2023-12-12 13:30:53 +01:00
committed by Space Team
parent a1d13f54cb
commit a5f3d5b737
269 changed files with 2207 additions and 0 deletions
@@ -0,0 +1,61 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.controlflow.`break`
import kotlin.test.*
fun foo() {
var i = 0
l1@while (true) {
println("foo@l1")
try {
l2@while (true) {
if ((i++ % 2) == 0) continue@l2
println("foo@l2")
if (i > 4) break@l1
}
} finally {
}
}
}
fun bar() {
var i = 0
l1@do {
try {
println("bar@l1")
throw Exception()
} catch (e: Exception) {
l2@do {
if ((i++ % 2) == 0) continue@l2
println("bar@l2")
if (i > 4) break@l1
} while (true)
}
} while (true)
}
fun qux() {
l1@for (i in 1..6) {
t1@try {
println("qux@t1")
throw Exception()
}
finally {
l2@ for (j in 1..6) {
if ((j % 2) == 0) continue@l2
println("qux@l2")
if (j > 4) break@l1
}
}
}
}
@Test fun runTest() {
foo()
bar()
qux()
}
@@ -0,0 +1,12 @@
foo@l1
foo@l2
foo@l2
foo@l2
bar@l1
bar@l2
bar@l2
bar@l2
qux@t1
qux@l2
qux@l2
qux@l2
@@ -0,0 +1,16 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.controlflow.break1
import kotlin.test.*
@Test fun runTest() {
loop@ while (true) {
println("Body")
break
}
println("Done")
}
@@ -0,0 +1,2 @@
Body
Done
@@ -0,0 +1,83 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.controlflow.for_loops
import kotlin.test.*
@Test fun runTest() {
// Simple loops
for (i in 0..4) {
print(i)
}
println()
for (i in 0 until 4) {
print(i)
}
println()
for (i in 4 downTo 0) {
print(i)
}
println()
println()
// Steps
for (i in 0..4 step 2) {
print(i)
}
println()
for (i in 0 until 4 step 2) {
print(i)
}
println()
for (i in 4 downTo 0 step 2) {
print(i)
}
println()
println()
// Two steps
for (i in 0..6 step 2 step 3) {
print(i)
}
println()
for (i in 0 until 6 step 2 step 3) {
print(i)
}
println()
for (i in 6 downTo 0 step 2 step 3) {
print(i)
}
println()
println()
// Without constants
val a = 0
val b = 4
val s = 2
for (i in a..b step s) {
print(i)
}
println()
for (i in a until b step s) {
print(i)
}
println()
for (i in b downTo a step s) {
print(i)
}
println()
println()
}
@@ -0,0 +1,16 @@
01234
0123
43210
024
02
420
036
03
630
024
02
420
@@ -0,0 +1,40 @@
package codegen.controlflow.for_loops_array
import kotlin.test.*
fun <T : ByteArray> genericArray(data : T): Int {
var sum = 0
for (element in data) {
sum += element
}
return sum
}
fun IntArray.sum(): Int {
var sum = 0
for (element in this) {
sum += element
}
return sum
}
@Test fun runTest() {
val intArray = intArrayOf(4, 0, 3, 5)
val emptyArray = arrayOf<Any>()
for (element in intArray) {
print(element)
}
println()
for (element in emptyArray) {
print(element)
}
println()
val byteArray = byteArrayOf(1, -1)
println(genericArray(byteArray))
val fives = intArrayOf(5, 5, 5, -5, -5, -5)
println(fives.sum())
}
@@ -0,0 +1,4 @@
4035
0
0
@@ -0,0 +1,21 @@
package codegen.controlflow.for_loops_array_break_continue
import kotlin.test.*
@Test fun runTest() {
val intArray = intArrayOf(4, 0, 3, 5)
val emptyArray = arrayOf<Any>()
for (element in intArray) {
print(element)
if (element == 3) {
break
}
}
println()
for (element in emptyArray) {
print(element)
}
println()
}
@@ -0,0 +1,2 @@
403
@@ -0,0 +1,18 @@
package codegen.controlflow.for_loops_array_indices
import kotlin.test.*
@Test fun runTest() {
val intArray = intArrayOf(4, 0, 3, 5)
val emptyArray = arrayOf<Any>()
for (index in intArray.indices) {
print(index)
}
println()
for (index in emptyArray.indices) {
print(index)
}
println()
}
@@ -0,0 +1,2 @@
0123
@@ -0,0 +1,13 @@
package codegen.controlflow.for_loops_array_mutation
import kotlin.test.*
@Test fun runTest() {
val intArray = arrayOf(4, 0, 3, 5)
for (element in intArray) {
intArray[2] = 0
intArray[3] = 0
print(element)
}
}
@@ -0,0 +1 @@
4000
@@ -0,0 +1,25 @@
package codegen.controlflow.for_loops_array_nested
import kotlin.test.*
@Test fun arrayOfArrays() {
val metaArray = arrayOf(
arrayOf(1, 2, 3),
arrayOf("Hello"),
arrayOf<Any>(),
arrayOf(1..10)
)
for (array in metaArray) {
inner@for (elem in array) {
if (elem is IntProgression) {
for (i in elem) {
print(i)
}
continue@inner
} else {
print(elem)
}
}
println()
}
}
@@ -0,0 +1,4 @@
123
Hello
12345678910
@@ -0,0 +1,16 @@
package codegen.controlflow.for_loops_array_nullable
import kotlin.test.*
private fun nullableArray(a: Array<Int>): Array<Int>? {
return a
}
@Test fun nullable() {
val array = arrayOf(1, 2, 3)
nullableArray(array)?.let {
for (elem in it) {
print(elem)
}
}
}
@@ -0,0 +1 @@
123
@@ -0,0 +1,23 @@
package codegen.controlflow.for_loops_array_side_effects
import kotlin.test.*
private fun <T> sideEffect(array: T): T {
println("side-effect")
return array
}
@Test fun runTest() {
val intArray = intArrayOf(4, 0, 3, 5)
val emptyArray = arrayOf<Any>()
for (element in sideEffect(intArray)) {
print(element)
}
println()
for (element in sideEffect(emptyArray)) {
print(element)
}
println()
}
@@ -0,0 +1,4 @@
side-effect
4035
side-effect
@@ -0,0 +1,19 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.controlflow.for_loops_call_order
import kotlin.test.*
fun f1(): Int { print("1"); return 0 }
fun f2(): Int { print("2"); return 6 }
fun f3(): Int { print("3"); return 2 }
fun f4(): Int { print("4"); return 3 }
@Test fun runTest() {
for (i in f1()..f2() step f3() step f4()) { }; println()
for (i in f1() until f2() step f3() step f4()) {}; println()
for (i in f2() downTo f1() step f3() step f4()) {}; println()
}
@@ -0,0 +1,3 @@
1234
1234
2134
@@ -0,0 +1,21 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.controlflow.for_loops_coroutines
import kotlin.test.*
import kotlin.coroutines.*
@Test fun runTest() {
val sq = sequence {
for (i in 0..6 step 2) {
print("before: $i ")
yield(i)
println("after: $i")
}
}
println("Got: ${sq.joinToString(separator = " ")}")
}
@@ -0,0 +1,5 @@
before: 0 after: 0
before: 2 after: 2
before: 4 after: 4
before: 6 after: 6
Got: 0 2 4 6
@@ -0,0 +1,25 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.controlflow.for_loops_empty_range
import kotlin.test.*
@Test fun runTest() {
// Simple loops
for (i in 4..0) { print(i) }
for (i in 4 until 0) { print(i) }
for (i in 0 downTo 4) { print(i) }
// Steps
for (i in 4..0 step 2) { print(i) }
for (i in 4 until 0 step 2) { print(i) }
for (i in 0 downTo 4 step 2) { print(i) }
// Two steps
for (i in 6..0 step 2 step 3) { print(i) }
for (i in 6 until 0 step 2 step 3) { print(i) }
for (i in 0 downTo 6 step 2 step 3) { print(i) }
println("OK")
}
@@ -0,0 +1 @@
OK
@@ -0,0 +1,60 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.controlflow.for_loops_errors
import kotlin.test.*
@Test fun runTest() {
// Negative step.
try {
for (i in 0 .. 4 step -2) print(i); println()
throw AssertionError()
} catch (e: IllegalArgumentException) {}
try {
for (i in 0 until 4 step -2) print(i); println()
throw AssertionError()
} catch (e: IllegalArgumentException) {}
try {
for (i in 4 downTo 0 step -2) print(i); println()
throw AssertionError()
} catch (e: IllegalArgumentException) {}
// Zero step.
try {
for (i in 0 .. 4 step 0) print(i); println()
throw AssertionError()
} catch (e: IllegalArgumentException) {}
try {
for (i in 0 until 4 step 0) print(i); println()
throw AssertionError()
} catch (e: IllegalArgumentException) {}
try {
for (i in 4 downTo 0 step 0) print(i); println()
throw AssertionError()
} catch (e: IllegalArgumentException) {}
// Two steps, one is negative.
try {
for (i in 0 .. 4 step -2 step 3) print(i); println()
throw AssertionError()
} catch (e: IllegalArgumentException) {}
try {
for (i in 0 until 4 step -2 step 3) print(i); println()
throw AssertionError()
} catch (e: IllegalArgumentException) {}
try {
for (i in 4 downTo 0 step -2 step 3) print(i); println()
throw AssertionError()
} catch (e: IllegalArgumentException) {}
println("OK")
}
@@ -0,0 +1 @@
OK
@@ -0,0 +1,156 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.controlflow.for_loops_let_with_nullable
import kotlin.test.*
// Github issue #1012
fun testInt(left: Int?, right: Int?, step: Int?) {
right?.let {
for (i in 0..it) { print(i) }
}
println()
left?.let {
for (i in it..5) { print(i) }
}
println()
step?.let {
for (i in 0..5 step it) { print(i) }
}
println()
right?.let {
for (i in 0 until it) { print(i) }
}
println()
left?.let {
for (i in it until 5) { print(i) }
}
println()
step?.let {
for (i in 0 until 5 step it) { print(i) }
}
println()
right?.let {
for (i in it downTo 0) { print(i) }
}
println()
left?.let {
for (i in 5 downTo it) { print(i) }
}
println()
step?.let {
for (i in 5 downTo 0 step it) { print(i) }
}
println()
}
fun testLong(left: Long?, right: Long?, step: Long?) {
right?.let {
for (i in 0..it) { print(i) }
}
println()
left?.let {
for (i in it..5) { print(i) }
}
println()
step?.let {
for (i in 0..5L step it) { print(i) }
}
println()
right?.let {
for (i in 0 until it) { print(i) }
}
println()
left?.let {
for (i in it until 5) { print(i) }
}
println()
step?.let {
for (i in 0 until 5L step it) { print(i) }
}
println()
right?.let {
for (i in it downTo 0) { print(i) }
}
println()
left?.let {
for (i in 5 downTo it) { print(i) }
}
println()
step?.let {
for (i in 5 downTo 0L step it) { print(i) }
}
println()
}
fun testChar(left: Char?, right: Char?, step: Int?) {
right?.let {
for (i in 'a'..it) { print(i) }
}
println()
left?.let {
for (i in it..'f') { print(i) }
}
println()
step?.let {
for (i in 'a'..'f' step it) { print(i) }
}
println()
right?.let {
for (i in 'a' until it) { print(i) }
}
println()
left?.let {
for (i in it until 'f') { print(i) }
}
println()
step?.let {
for (i in 'a' until 'f' step it) { print(i) }
}
println()
right?.let {
for (i in it downTo 'a') { print(i) }
}
println()
left?.let {
for (i in 'f' downTo it) { print(i) }
}
println()
step?.let {
for (i in 'f' downTo 'a' step it) { print(i) }
}
println()
}
@Test fun runTest() {
testInt(0, 5, 2)
testLong(0, 5, 2)
testChar('a', 'f', 2)
}
@@ -0,0 +1,27 @@
012345
012345
024
01234
01234
024
543210
543210
531
012345
012345
024
01234
01234
024
543210
543210
531
abcdef
abcdef
ace
abcde
abcde
ace
fedcba
fedcba
fdb
@@ -0,0 +1,68 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.controlflow.for_loops_nested
import kotlin.test.*
@Test fun runTest() {
// Simple
for (i in 0..2) {
for (j in 0..2) {
print("$i$j ")
}
}
println()
// Break
l1@for (i in 0..2) {
l2@for (j in 0..2) {
print("$i$j ")
if (j == 1) break
}
}
println()
l1@for (i in 0..2) {
l2@for (j in 0..2) {
print("$i$j ")
if (j == 1) break@l2
}
}
println()
l1@for (i in 0..2) {
l2@for (j in 0..2) {
print("$i$j ")
if (j == 1) break@l1
}
}
println()
// Continue
l1@for (i in 0..2) {
l2@for (j in 0..2) {
if (j == 1) continue
print("$i$j ")
}
}
println()
l1@for (i in 0..2) {
l2@for (j in 0..2) {
if (j == 1) continue@l2
print("$i$j ")
}
}
println()
l1@for (i in 0..2) {
l2@for (j in 0..2) {
if (j == 1) continue@l1
print("$i$j ")
}
}
println()
}
@@ -0,0 +1,7 @@
00 01 02 10 11 12 20 21 22
00 01 10 11 20 21
00 01 10 11 20 21
00 01
00 02 10 12 20 22
00 02 10 12 20 22
00 10 20
@@ -0,0 +1,31 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.controlflow.for_loops_overflow
import kotlin.test.*
@Test fun runTest() {
for (i in Int.MAX_VALUE - 1 .. Int.MAX_VALUE) { print(i); print(' ') }; println()
for (i in Int.MAX_VALUE - 1 until Int.MAX_VALUE) { print(i); print(' ') }; println()
for (i in Int.MIN_VALUE + 1 downTo Int.MIN_VALUE) { print(i); print(' ') }; println()
// Empty loops
for (i in Byte.MIN_VALUE until Byte.MIN_VALUE) { print(i); print(' ') }
for (i in Short.MIN_VALUE until Short.MIN_VALUE) { print(i); print(' ') }
for (i in Int.MIN_VALUE until Int.MIN_VALUE) { print(i); print(' ') }
for (i in Long.MIN_VALUE until Long.MIN_VALUE) { print(i); print(' ') }
for (i in 0.toChar() until 0.toChar()) { print(i); print(' ') }
for (i in 0 until Byte.MIN_VALUE) { print(i); print(' ') }
for (i in 0 until Short.MIN_VALUE) { print(i); print(' ') }
for (i in 0 until Int.MIN_VALUE) { print(i); print(' ') }
for (i in 0 until Long.MIN_VALUE) { print(i); print(' ') }
for (i in 'a' until 0.toChar()) { print(i); print(' ') }
val M = Int.MAX_VALUE / 2
for (i in M + 4..M + 10 step M) { print(i); print(' ') }; println()
}
@@ -0,0 +1,4 @@
2147483646 2147483647
2147483646
-2147483647 -2147483648
1073741827
@@ -0,0 +1,114 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.controlflow.for_loops_types
import kotlin.test.*
@Test fun runTest() {
for (i in 0.toByte() .. 4.toByte()) print(i); println()
for (i in 0.toByte() .. 4.toShort()) print(i); println()
for (i in 0.toByte() .. 4.toInt()) print(i); println()
for (i in 0.toByte() .. 4.toLong()) print(i); println()
for (i in 0.toShort() .. 4.toByte()) print(i); println()
for (i in 0.toShort() .. 4.toShort()) print(i); println()
for (i in 0.toShort() .. 4.toInt()) print(i); println()
for (i in 0.toShort() .. 4.toLong()) print(i); println()
for (i in 0.toInt() .. 4.toByte()) print(i); println()
for (i in 0.toInt() .. 4.toShort()) print(i); println()
for (i in 0.toInt() .. 4.toInt()) print(i); println()
for (i in 0.toInt() .. 4.toLong()) print(i); println()
for (i in 0.toLong() .. 4.toByte()) print(i); println()
for (i in 0.toLong() .. 4.toShort()) print(i); println()
for (i in 0.toLong() .. 4.toInt()) print(i); println()
for (i in 0.toLong() .. 4.toLong()) print(i); println()
for (i in 0.toByte() until 4.toByte()) print(i); println()
for (i in 0.toByte() until 4.toShort()) print(i); println()
for (i in 0.toByte() until 4.toInt()) print(i); println()
for (i in 0.toByte() until 4.toLong()) print(i); println()
for (i in 0.toShort() until 4.toByte()) print(i); println()
for (i in 0.toShort() until 4.toShort()) print(i); println()
for (i in 0.toShort() until 4.toInt()) print(i); println()
for (i in 0.toShort() until 4.toLong()) print(i); println()
for (i in 0.toInt() until 4.toByte()) print(i); println()
for (i in 0.toInt() until 4.toShort()) print(i); println()
for (i in 0.toInt() until 4.toInt()) print(i); println()
for (i in 0.toInt() until 4.toLong()) print(i); println()
for (i in 0.toLong() until 4.toByte()) print(i); println()
for (i in 0.toLong() until 4.toShort()) print(i); println()
for (i in 0.toLong() until 4.toInt()) print(i); println()
for (i in 0.toLong() until 4.toLong()) print(i); println()
for (i in 4.toByte() downTo 0.toByte()) print(i); println()
for (i in 4.toByte() downTo 0.toShort()) print(i); println()
for (i in 4.toByte() downTo 0.toInt()) print(i); println()
for (i in 4.toByte() downTo 0.toLong()) print(i); println()
for (i in 4.toShort() downTo 0.toByte()) print(i); println()
for (i in 4.toShort() downTo 0.toShort()) print(i); println()
for (i in 4.toShort() downTo 0.toInt()) print(i); println()
for (i in 4.toShort() downTo 0.toLong()) print(i); println()
for (i in 4.toInt() downTo 0.toByte()) print(i); println()
for (i in 4.toInt() downTo 0.toShort()) print(i); println()
for (i in 4.toInt() downTo 0.toInt()) print(i); println()
for (i in 4.toInt() downTo 0.toLong()) print(i); println()
for (i in 4.toLong() downTo 0.toByte()) print(i); println()
for (i in 4.toLong() downTo 0.toShort()) print(i); println()
for (i in 4.toLong() downTo 0.toInt()) print(i); println()
for (i in 4.toLong() downTo 0.toLong()) print(i); println()
for (i in 'a' .. 'd') print(i); println()
for (i in 'a' until 'd') print(i); println()
for (i in 'd' downTo 'a') print(i); println()
for (i in 0.toByte() .. 4.toByte() step 2) print(i); println()
for (i in 0.toByte() .. 4.toShort() step 2) print(i); println()
for (i in 0.toByte() .. 4.toInt() step 2) print(i); println()
for (i in 0.toByte() .. 4.toLong() step 2L) print(i); println()
for (i in 0.toShort() .. 4.toByte() step 2) print(i); println()
for (i in 0.toShort() .. 4.toShort() step 2) print(i); println()
for (i in 0.toShort() .. 4.toInt() step 2) print(i); println()
for (i in 0.toShort() .. 4.toLong() step 2L) print(i); println()
for (i in 0.toInt() .. 4.toByte() step 2) print(i); println()
for (i in 0.toInt() .. 4.toShort() step 2) print(i); println()
for (i in 0.toInt() .. 4.toInt() step 2) print(i); println()
for (i in 0.toInt() .. 4.toLong() step 2L) print(i); println()
for (i in 0.toLong() .. 4.toByte() step 2L) print(i); println()
for (i in 0.toLong() .. 4.toShort() step 2L) print(i); println()
for (i in 0.toLong() .. 4.toInt() step 2L) print(i); println()
for (i in 0.toLong() .. 4.toLong() step 2L) print(i); println()
for (i in 0.toByte() until 4.toByte() step 2) print(i); println()
for (i in 0.toByte() until 4.toShort() step 2) print(i); println()
for (i in 0.toByte() until 4.toInt() step 2) print(i); println()
for (i in 0.toByte() until 4.toLong() step 2L) print(i); println()
for (i in 0.toShort() until 4.toByte() step 2) print(i); println()
for (i in 0.toShort() until 4.toShort() step 2) print(i); println()
for (i in 0.toShort() until 4.toInt() step 2) print(i); println()
for (i in 0.toShort() until 4.toLong() step 2L) print(i); println()
for (i in 0.toInt() until 4.toByte() step 2) print(i); println()
for (i in 0.toInt() until 4.toShort() step 2) print(i); println()
for (i in 0.toInt() until 4.toInt() step 2) print(i); println()
for (i in 0.toInt() until 4.toLong() step 2L) print(i); println()
for (i in 0.toLong() until 4.toByte() step 2L) print(i); println()
for (i in 0.toLong() until 4.toShort() step 2L) print(i); println()
for (i in 0.toLong() until 4.toInt() step 2L) print(i); println()
for (i in 0.toLong() until 4.toLong() step 2L) print(i); println()
for (i in 4.toByte() downTo 0.toByte() step 2) print(i); println()
for (i in 4.toByte() downTo 0.toShort() step 2) print(i); println()
for (i in 4.toByte() downTo 0.toInt() step 2) print(i); println()
for (i in 4.toByte() downTo 0.toLong() step 2L) print(i); println()
for (i in 4.toShort() downTo 0.toByte() step 2) print(i); println()
for (i in 4.toShort() downTo 0.toShort() step 2) print(i); println()
for (i in 4.toShort() downTo 0.toInt() step 2) print(i); println()
for (i in 4.toShort() downTo 0.toLong() step 2L) print(i); println()
for (i in 4.toInt() downTo 0.toByte() step 2) print(i); println()
for (i in 4.toInt() downTo 0.toShort() step 2) print(i); println()
for (i in 4.toInt() downTo 0.toInt() step 2) print(i); println()
for (i in 4.toInt() downTo 0.toLong() step 2L) print(i); println()
for (i in 4.toLong() downTo 0.toByte() step 2L) print(i); println()
for (i in 4.toLong() downTo 0.toShort() step 2L) print(i); println()
for (i in 4.toLong() downTo 0.toInt() step 2L) print(i); println()
for (i in 4.toLong() downTo 0.toLong() step 2L) print(i); println()
for (i in 'a' .. 'd' step 2) print(i); println()
for (i in 'a' until 'd' step 2) print(i); println()
for (i in 'd' downTo 'a' step 2) print(i); println()
}
@@ -0,0 +1,102 @@
01234
01234
01234
01234
01234
01234
01234
01234
01234
01234
01234
01234
01234
01234
01234
01234
0123
0123
0123
0123
0123
0123
0123
0123
0123
0123
0123
0123
0123
0123
0123
0123
43210
43210
43210
43210
43210
43210
43210
43210
43210
43210
43210
43210
43210
43210
43210
43210
abcd
abc
dcba
024
024
024
024
024
024
024
024
024
024
024
024
024
024
024
024
02
02
02
02
02
02
02
02
02
02
02
02
02
02
02
02
420
420
420
420
420
420
420
420
420
420
420
420
420
420
420
420
ac
ac
db
@@ -0,0 +1,17 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.controlflow.unreachable1
import kotlin.test.*
@Test fun runTest() {
println(foo())
}
fun foo(): Int {
return 1
println("After return")
}
@@ -0,0 +1 @@
1