Files
kotlin-fork/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1156.kt
T
Andrey Breslav 3d8d92c7d3 JetDiagnosticsTest migrated to TestGenerator
- test data files renamed from *.jet to *.kt
2012-07-10 14:48:11 +04:00

8 lines
203 B
Kotlin

//KT-1156 Throwing exception on the right side of elvis operator marks code unreachable
fun foo(maybe: Int?) {
val i : Int = maybe ?: throw RuntimeException("No value")
System.out.println(i)
}