Closed glooms closed 3 years ago
I tried your playground example and got 10
both with and without n += 1
. Which is to be expected; fallthrough
always passes control to the next case block regardless of the next case condition.
Ah! Didn't know that, but it makes sense. I guess there was a bug in my code after-all then ^^ Apologies, and thanks! :)
I'll close this issue
I found a false ineffectual assignment in a case similar to this:
It says that
n += 1
is ineffectual when it is very much effectual. Without ita
is0
, with it it's10
. Same example on go playground here.(Also, thanks for good linting in general, very useful for catching bugs. :) )