iosched
iosched copied to clipboard
Make sure type parameter of Event class is non-null
-
null
can't be used as a valid content ofEvent
becauseEvent
usesnull
to indicate the event has been already handled - It means the type parameter
T
ofEvent
should never be nullable - Expressed that constrain by giving upper bound
Any
toT
- Reference: https://speakerdeck.com/npryce/the-kotlin-type-hierarchy-from-top-to-bottom?slide=27