it's telling me that the `it.get` is expecting `No...
# getting-started
p
it's telling me that the
it.get
is expecting
Nothing
.. why?
d
joe::class
is
KClass<out Customer>
, because the compiler cannot prove that
joe
is actually a
Customer
and not a subclass of customer. So if you want to call a property getter from that, you can't (hence
Nothing
) because you don't know what the actual type of
joe
and thereby
joe::class
is.
it.getter.call
works, because
KCallable.call
is not typesafe (it just accepts vararg of
Any?