How to write in Kotlin:
flags |= newFlag
Only what I have found is:
flags = flags or newFlag
Is there a build-in bitwise or
operator with assignment?
Kotlin Assignment Operators Assignment operators are used to assign values to variables.
This operator is also known as "not-null assertion operator". This operator is used to convert any value to a non-NULL type value and it throws an exception if the corresponding value is NULL.
Logical Operators Note that, or and and are functions that support infix notation. Logical operators are used in control flow such as if expression, when expression, and loops.
There is no built in bitwise-or assignment operator in Kotlin (yet).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With