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
I have a (simple) fix for this but I want to think it through more carefully - will have to wait for tomorrow afternoon. We should probably accept this for 1.6 as it was introduced between 1.5 and 1.6 and it does prevent correct programs from type-checking.
I agree we should get this fix in ASAP. It causes any program that typechecks github.com/GoogleCloudPlatform/gcloud-golang/datastore (see time.go) to crash.
% cat ~/a.go
package f
const _ = int64(-1<<63) % 1e6
% ssadump ~/a.go
panic: invalid binary operation -9.22337e+18 % 1e+06 [recovered]
panic: invalid binary operation -9.22337e+18 % 1e+06
goroutine 1 [running]:
go/types.(_Checker).handleBailout(0xc8200ac000, 0xc8200bf2d0)
/usr/local/google/home/adonovan/go/src/go/types/check.go:213 +0xd8
go/constant.BinaryOp(0x7fa1c5d35d20, 0xc820010cc0, 0x10, 0x7fa1c5d35d20, 0xc820010c80, 0x0, 0x0)
/usr/local/google/home/adonovan/go/src/go/constant/value.go:1110 +0x48c
go/types.(_Checker).binary(0xc8200ac000, 0xc820010bc0, 0xc820012d50, 0x7fa1c5d35b40, 0xc820010b00, 0x7fa1c5d35a98, 0xc82000ab20, 0x10)
/usr/local/google/home/adonovan/go/src/go/types/expr.go:815 +0x703
go/types.(_Checker).exprInternal(0xc8200ac000, 0xc820010bc0, 0x7fa1c5d35b08, 0xc820012d50, 0x0, 0x0, 0x7e)
/usr/local/google/home/adonovan/go/src/go/types/expr.go:1398 +0x2875
go/types.(_Checker).rawExpr(0xc8200ac000, 0xc820010bc0, 0x7fa1c5d35b08, 0xc820012d50, 0x0, 0x0, 0x0)
/usr/local/google/home/adonovan/go/src/go/types/expr.go:943 +0x7d
go/types.(_Checker).multiExpr(0xc8200ac000, 0xc820010bc0, 0x7fa1c5d35b08, 0xc820012d50)
/usr/local/google/home/adonovan/go/src/go/types/expr.go:1470 +0x63
go/types.(_Checker).expr(0xc8200ac000, 0xc820010bc0, 0x7fa1c5d35b08, 0xc820012d50)
/usr/local/google/home/adonovan/go/src/go/types/expr.go:1464 +0x3f
...
The text was updated successfully, but these errors were encountered: