Files
kotlin-fork/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClasses/extensionPropertyWithSameName.kt
T
Alexander Udalov 7fb3f48c67 Add ClassDescriptor.getInlineClassRepresentation
This will be used at least in the JVM backend instead of the current
approach where we're loading the primary constructor's first parameter,
which isn't good enough since primary constructor can be private, and
we can't rely on private declarations in case they're declared in
another module.
2021-05-13 13:54:02 +02:00

15 lines
275 B
Kotlin
Vendored

// WITH_RUNTIME
// MODULE: lib
// FILE: A.kt
inline class A(val value: String) {
val Char.value: String get() = this + nonExtensionValue()
fun nonExtensionValue(): String = value
}
// MODULE: main(lib)
// FILE: B.kt
fun box(): String = with(A("K")) { 'O'.value }