7fb3f48c67
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.
15 lines
275 B
Kotlin
Vendored
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 }
|