Fix for KT-14162: Support @InlineOnly on inline properties
#KT-14162 Fixed
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
// FILE: 1.kt
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
inline fun stub() {
|
||||
|
||||
}
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@kotlin.internal.InlineOnly
|
||||
inline val prop: String
|
||||
get() = "OK"
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return prop
|
||||
}
|
||||
|
||||
// FILE: 2.smap
|
||||
|
||||
SMAP
|
||||
2.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
*L
|
||||
1#1,8:1
|
||||
*E
|
||||
@@ -0,0 +1,39 @@
|
||||
// FILE: 1.kt
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
inline val <reified T : Any> T.className: String; get() = T::class.java.simpleName
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
val z = "OK".className
|
||||
if (z != "String") return "fail: $z"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// FILE: 2.smap
|
||||
|
||||
SMAP
|
||||
2.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
*L
|
||||
1#1,12:1
|
||||
5#2:13
|
||||
*E
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
*L
|
||||
6#1:13
|
||||
*E
|
||||
Reference in New Issue
Block a user