https://kotlinlang.org logo
#announcements
Title
# announcements
c

ccrowe

01/09/2017, 8:19 PM
Yea I’ve been trying to do it with infix as well but the params are vals so they can’t be mutated. To get around that I made a wrapper class that handles it pretty well, but I’m not a fan of having to wrap and unwrap everything.
Copy code
infix fun IntBit.ashl(second: Int) {
    wrapped_value = wrapped_value shl second
}