groostav
01/04/2017, 11:30 AMoperator fun Boolean.inc() = ! this;
//usage:
var myBool = false;
fun something(){
myBool++
}
although, in trying that on my machine I'm getting the rather nonsensical error:
Error:(446, 9) Kotlin: 'operator' modifier is inapplicable on this function: receiver must be a supertype of the return type