https://kotlinlang.org logo
r

Ruckus

08/01/2016, 8:39 PM
The easy way would be to create new functions for each of the primitives (one each for
property(value: Primitive)
,
property(block: () -> PrimitiveProperty)
, and
Any.getProperty(prop: KMutableProperty<*, Primitive>)
(that's 15 new functions; I missed
Any.getProperty
earlier)) and new classes for each primitive delegate (
PrimitivePropertyDelegate
(5 new classes)), but that's a lot of new code to maintain.