January 2018
Intermediate to advanced
434 pages
14h 1m
English
Let's see how to work with inline properties in these steps:
var x.valueIsMaxedOut: Booleaninline get() = x.value == CONST_MAX
inline var x.valueIsMaxedOut: Booleanget() = x.value == CONST_MAXset(value) { // set field here println(“Value set!”)}
In the preceding snippet, both accessors are inlined.
Read now
Unlock full access