Does it make sense that calling the following exte...
# announcements
e
Does it make sense that calling the following extension function on a null
String?
would print
int?
inline val <reified T : Any?> T.TAG get() = ((this as? Any)?.javaClass?.simpleName ?: "${T::class.java.simpleName ?: "null"}?").replace("CompanionObject", "")
m
eygraber: I get "String?"
e
@mfulton26 using 1.1? Also, I'm running it on Android
m
Yeah, 1.1, on my desktop
e
Interesting. Maybe Android fudges things around to handle nulls in dex? Thanks for your input though 😄
👍🏻 1
m
Are you calling
TAG
on anything related to resources (which are `Int`s)? I guess I'm wondering what you get if you call
x.TAG
on
val x: String? = null
.
e
That's the case I was referring to. For that I get
int?
m
Weird.