Saw a bug with someone using a right-value operati...
# random
b
Saw a bug with someone using a right-value operation for a number on a new line, expecting it to work like it did in Java. My manager joked that I should make a meme as a report of this bug.
i
Also val i += 1 😉
b
Wouldn't that be a compiler error, as you are re-assigning
i
, which is a
val
?
👍 1
🚫 1
m
I think that behavior is intentional and the stray
+1
will cause an weak “unused” warning in IDE 🤔 But that warning is very easy to miss!
b
It was actually. When I reviewed the code on github, I kept overlooking it. Even the IDE had the weak warning like you mentioned.