Files
kotlin/compiler/testData/repl/exceptionInVariableInitializer.repl
Alexander Udalov 18a211cb84 Add regression test for obsolete issue
#KT-17365
2017-05-18 13:29:02 +03:00

9 lines
207 B
Plaintext
Vendored

>>> var x: Int = { -> if (true) throw RuntimeException() else 5}()
java.lang.RuntimeException
at Line_0$x$1.invoke(Line_0.kts:1)
at Line_0$x$1.invoke(Line_0.kts:1)
>>> x
error: unresolved reference: x
x
^