Fix for KT-17588: Compiler error while optimizer tries to get rid of captured variable
#KT-17588 Fixed
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
//WITH_RUNTIME
|
||||
class Test {
|
||||
|
||||
data class Style(
|
||||
val color: Int? = null,
|
||||
val underlined: Boolean? = null,
|
||||
val separator: String = ""
|
||||
)
|
||||
|
||||
init {
|
||||
var flag: Boolean? = null
|
||||
|
||||
val receiver: String = "123"
|
||||
try {
|
||||
receiver.let { a2 ->
|
||||
flag = false
|
||||
}
|
||||
} finally {
|
||||
receiver.hashCode()
|
||||
}
|
||||
val style = Style(null, flag, "123")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
Test()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user