From: Rob Pike Date: Mon, 11 Aug 2008 20:08:16 +0000 (-0700) Subject: code in bug was wrong; correct and improve. works now. X-Git-Tag: weekly.2009-11-06~3338 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=cbaca0be24eae02587da6a0e269a4ecf5df19a13;p=gostls13.git code in bug was wrong; correct and improve. works now. R=gri OCL=14088 CL=14088 --- diff --git a/test/fixedbugs/bug012.go b/test/fixedbugs/bug012.go index 7f5fd84b36..e51819ebb6 100644 --- a/test/fixedbugs/bug012.go +++ b/test/fixedbugs/bug012.go @@ -12,8 +12,10 @@ func main() { var u31 uint64 = 1; var u32 uint64 = 18446744073709551615; var u33 uint64 = +18446744073709551615; - if u32 != ^0 { panic "u32\n"; } - if u33 != ^0 { panic "u33\n"; } + if u32 != (1<<64)-1 { panic "u32\n"; } + if u33 != (1<<64)-1 { panic "u33\n"; } + var i34 int64 = ^0; // note: 2's complement means ^0 == -1 + if i34 != -1 { panic "i34" } } /* bug12.go:5: overflow converting constant to UINT64