inline val ButWhy get() = "?"
val Difference get() = "?"
Zoltan Demant
12/29/2022, 1:57 PM
public final static getButWhy()Ljava/lang/String;
@Lorg/jetbrains/annotations/NotNull;() // invisible
L0
LDC 0
ISTORE 0
L1
LINENUMBER 13 L1
LDC "?"
ARETURN
L2
LOCALVARIABLE $i$f$getButWhy I L1 L2 0
MAXSTACK = 1
MAXLOCALS = 1
public final static getDifference()Ljava/lang/String;
@Lorg/jetbrains/annotations/NotNull;() // invisible
L0
LINENUMBER 15 L0
LDC "?"
ARETURN
L1
MAXSTACK = 1
MAXLOCALS = 0
(Clearly a difference, but I cant tell what that means in practice) 💡
c
CLOVIS
12/29/2022, 3:22 PM
IIRC the main difference is on the call-site, it shouldn't call the
inline get
👍🏽 1
☝️ 1
g
gildor
01/03/2023, 8:52 AM
also with internal annotation @InlineOnly (used by stdlib) you will not have this method as part of bytecode at all, it will not be in resulting compilation