semoro
03/24/2017, 6:51 PMoperator fun <T> FieldDelegate.getValue(thisRef: Any?, property: KProperty<*>): T {
@Suppress("UNCHECKED_CAST")
return when(property.returnType) {
String::class -> ""
Int::class -> 42
else -> null
} as T
}
Also please start class names with uppercase 😊marcoferrer
03/24/2017, 10:06 PM