Luis Munoz
10/03/2019, 3:25 PMLeoColman
10/03/2019, 3:26 PMPablichjenkov
10/03/2019, 3:27 PMfun process(someEnum: Enum) = when(someEnum) { ... }
LeoColman
10/03/2019, 3:28 PMfun Enum.process()
Mike
10/03/2019, 3:29 PMwhen
as an expression will also ensure it is checked for completion. A hidden gotcha with the Kotlin when
.
Depending on what 'callMethodx` does, it may make sense to convert this to sealed classes and polymorphism.LeoColman
10/03/2019, 3:33 PMLuis Munoz
10/03/2019, 3:33 PMLeoColman
10/03/2019, 3:33 PMLuis Munoz
10/03/2019, 3:34 PMLeoColman
10/03/2019, 3:34 PMLuis Munoz
10/03/2019, 3:35 PMLeoColman
10/03/2019, 3:36 PMLuis Munoz
10/03/2019, 3:42 PMPablichjenkov
10/03/2019, 3:49 PM