camkadev
11/09/2018, 10:08 AMBurkhard
11/09/2018, 10:12 AMsomeVariable::class.java
is the same as javas someVariable.getClass()
. So it does not resolve the type during compile time but at runtime depending on the value. Because of that someVariable
must not be null. If you want to resolve the type statically you could use GeneratedMessage::class
Egor Trutenko
11/09/2018, 10:18 AMthose
should've been smartcasted to non-nullablecamkadev
11/09/2018, 10:19 AMthis
hint is the same, this is just workaroundEgor Trutenko
11/09/2018, 10:26 AMcamkadev
11/09/2018, 10:32 AMEgor Trutenko
11/09/2018, 10:33 AMthis::class.java.name
use GeneratedMessage::class.java.name
nestserau
11/09/2018, 12:03 PM!!
as suggested by the IDE.!!
.val those = this
?Egor Trutenko
11/09/2018, 12:52 PM!!
?udalov
11/09/2018, 1:11 PMnestserau
11/09/2018, 1:12 PMthose!!::class.java.name