Initial version of codegen for inline classes

This commit is contained in:
Mikhail Zarechenskiy
2018-01-29 13:06:12 +03:00
parent fbc02dee58
commit 928a342ace
18 changed files with 266 additions and 148 deletions
@@ -0,0 +1,18 @@
// !LANGUAGE: +InlineClasses
inline class Foo(val x: Int) {
fun empty() {}
fun withParam(a: String) {}
fun withInlineClassParam(f: Foo) {}
fun test() {
empty()
withParam("hello")
withInlineClassParam(this)
}
}
// 2 INVOKESTATIC Foo\$Erased.empty \(I\)V
// 2 INVOKESTATIC Foo\$Erased.withParam \(ILjava/lang/String;\)V
// 2 INVOKESTATIC Foo\$Erased.withInlineClassParam \(II\)V
// 0 INVOKEVIRTUAL