Add and (un)mute inline class tests

This commit is contained in:
Steven Schäfer
2019-05-10 13:33:50 +02:00
committed by Alexander Udalov
parent f1f0c7e0a0
commit 917ef250cf
273 changed files with 117 additions and 262 deletions
@@ -0,0 +1,18 @@
// IGNORE_BACKEND: JS, JS_IR, NATIVE, JVM
// !LANGUAGE: +InlineClasses
@file:Suppress("SECONDARY_CONSTRUCTOR_WITH_BODY_INSIDE_INLINE_CLASS")
inline class Foo(val x: String) {
constructor(y: Int) : this("OK") {
if (y == 0) return throw java.lang.IllegalArgumentException()
if (y == 1) return
return Unit
}
constructor(z: Double) : this(z.toInt())
}
fun box(): String {
return Foo(42.0).x
}