Minor. Add test with inline class inside inline class's init block

This commit is contained in:
Ilmir Usmanov
2022-03-03 23:29:10 +01:00
committed by teamcity
parent 092550aaee
commit 254ada88d1
2 changed files with 22 additions and 0 deletions
@@ -127,6 +127,13 @@ value class InlineFunThis(val s: String) {
inline fun ok(): String = s
}
OPTIONAL_JVM_INLINE_ANNOTATION
value class InlineClass(val s: String) {
init {
SingleInitBlock(s)
}
}
var res: String = "FAIL"
fun box(): String {
@@ -181,5 +188,9 @@ fun box(): String {
InlineFunThis("OK")
if (res != "OK") return "FAIL 131: $res"
res = "FAIL 14"
InlineClass("OK")
if (res != "OK") return "FAIL 141: $res"
return "OK"
}