You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the compiler should refuse to compile this statement.
but the commenters agreed that a vet check might be more appropriate (see the discussion on the linked issue for more details).
Someone sent a change to add a vet check, but it wasn't merged. Apparently, it didn't satisfy the 3 vet requirements (correctness, precision, frequency).
Anyway, that was about vet. It seems like everyone agreed not to make this a compile error.
What version of Go are you using (
go version
)?1.9,2
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?amd64/windows and also amd64/linux
What did you do?
Compiled this...
What did you expect to see?
Error when unsigned is tested for negative.
What did you see instead?
Nothing
I believe it would be very useful if this error could be trapped at compile time.
The text was updated successfully, but these errors were encountered: