Marc Knaup
03/02/2020, 10:23 AM@kotlin.internal.InlineOnly
? (esp. in a Kotlin-only library) 🙂Fleshgrinder
03/02/2020, 11:12 AMMarc Knaup
03/02/2020, 11:58 AM@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
@kotlin.internal.InlineOnly
inline fun …
Fleshgrinder
03/02/2020, 12:22 PMFleshgrinder
03/02/2020, 12:23 PM@JvmSynthetic
and achieve the same goal. 😉Marc Knaup
03/02/2020, 12:24 PMBurkhard
03/02/2020, 12:25 PMInlineOnly
is probably never going to change and the consequences of adding it are quite easy to predict. Also it is used a lot in the standard library so it’s unlikely to break code.Marc Knaup
03/02/2020, 12:25 PM@JvmSynthetic
is for JVM only. I’m multiplatform.
Also it doesn’t make sense. I don’t want the useless method to be there and not just hide it.Fleshgrinder
03/02/2020, 12:27 PM@InlineOnly
actually remove it from the binary?Burkhard
03/02/2020, 12:28 PM-Xallow-kotlin-package
as a compiler argument.Fleshgrinder
03/02/2020, 12:29 PMFleshgrinder
03/02/2020, 12:30 PMMarc Knaup
03/02/2020, 12:31 PMFleshgrinder
03/02/2020, 12:32 PMMarc Knaup
03/02/2020, 12:33 PMFleshgrinder
03/02/2020, 12:33 PMinline
on something where IntelliJ says that the benfit is low of inlining then it's easier to just suppress that intention. It will be inlined in any event.Marc Knaup
03/02/2020, 12:33 PMFleshgrinder
03/02/2020, 12:36 PMFleshgrinder
03/02/2020, 12:37 PMBurkhard
03/02/2020, 12:37 PMMarc Knaup
03/02/2020, 12:37 PMSpecifies that this function should not be called directly without inliningNothing about privacy
Marc Knaup
03/02/2020, 12:37 PMFleshgrinder
03/02/2020, 12:38 PMInlineOnly means that the Java method corresponding to this Kotlin function is marked private so that Java code can not access it (which is the only way to call an inline function without actually inlining it).
Fleshgrinder
03/02/2020, 12:38 PM@JvmSynthetic
, as I said.Marc Knaup
03/02/2020, 12:39 PMFleshgrinder
03/02/2020, 12:39 PMMarc Knaup
03/02/2020, 12:39 PMMarc Knaup
03/02/2020, 12:40 PMFleshgrinder
03/02/2020, 12:40 PMMarc Knaup
03/02/2020, 12:40 PMFleshgrinder
03/02/2020, 12:40 PMMarc Knaup
03/02/2020, 12:40 PM@JvmSynthetic
?Burkhard
03/02/2020, 12:41 PM@InlineOnly
from the binary, but I’m not sure if that would break the library. 😜Fleshgrinder
03/02/2020, 12:41 PMMarc Knaup
03/02/2020, 12:42 PMFleshgrinder
03/02/2020, 12:42 PMFleshgrinder
03/02/2020, 12:43 PMprivate const val
should imho be removed from the binary, but reflection is probably the reason why even these guys stay.Fleshgrinder
03/02/2020, 12:43 PMprivate typealias
that lead to class redeclaration compiler failures if there is a class of the same name in the package. 😛Marc Knaup
03/02/2020, 12:44 PMBurkhard
03/02/2020, 12:44 PMFleshgrinder
03/02/2020, 12:45 PMMarc Knaup
03/02/2020, 12:45 PMFleshgrinder
03/02/2020, 12:49 PMSam Garfinkel
03/02/2020, 5:13 PMFleshgrinder
03/02/2020, 5:39 PMFleshgrinder
03/02/2020, 5:39 PM