Join Slack
Communities
Powered by
Right, that works if you have an instance paramete...
# announcements
k
karelpeeters
05/21/2018, 2:20 PM
Right, that works if you have an
instance
parameter. But what if you only have a
type
parameter?
a
agrosner
05/21/2018, 4:31 PM
What about adding a type param as a property that returns a KClass then you can do checking on that?
k
karelpeeters
05/21/2018, 4:34 PM
Well we have a class,
T::class
, but you can't do normal type checking on that, eg. an exhaustive when doesn't work.
a
agrosner
05/21/2018, 4:35 PM
That makes sense
agrosner
05/21/2018, 4:35 PM
You could do an else but obvs not ideal
3
Views
Open in Slack
Previous
Next