Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 533 Bytes

File metadata and controls

24 lines (17 loc) · 533 Bytes

Inline classes

This feature is not supported.

Explanation

In Kotlin, you can create an inline (value) class to wrap around a single value, without the performance hit at runtime.

@JvmInline
value class InlineClass(val arg1: Int) {
}

fun main(){
    //No instantiation of the class InlineClass happens, at runtime inlineClass contains just Int.
    val inlineClass = InlineClass(1)
}

However, this is feature is not available in Swift as the class is not in the .h file.


Table of contents