Support inline functions inside inline classes
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class Foo(val x: Int) {
|
||||
inline fun inc(): Foo = Foo(x + 1)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a = Foo(0)
|
||||
val b = a.inc().inc()
|
||||
|
||||
if (b.x != 2) return "fail"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user