KT-28585 Fix boxing for values of captured vars of inline class type

This commit is contained in:
Dmitry Petrov
2018-12-07 14:11:37 +03:00
parent 45035d3e11
commit 8ede477f99
7 changed files with 54 additions and 5 deletions
+18
View File
@@ -0,0 +1,18 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
// IGNORE_BACKEND: JVM_IR
fun box(): String {
var uint1 = 1u
var uint2 = 2u
var uint3 = 3u
val uintSet = mutableSetOf(uint1)
uintSet.add(uint2);
{
uintSet.add(uint3)
if (!uintSet.contains(1u)) throw AssertionError()
if (!uintSet.contains(2u)) throw AssertionError()
if (!uintSet.contains(3u)) throw AssertionError()
}()
return "OK"
}