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
What steps will reproduce the problem?
1. Run gotype (code.google.com/p/go.exp/gotype) on:
package main
var (
s uint = 20
x int = complex(1<<s, 2)
)
What is the expected output? What do you see instead?
Expected: something like
truc.go:5:??: cannot assign complex(1<<s, 2) (untyped complex) to x of type int
Got: no error.
Please use labels and text to provide additional information.
The text was updated successfully, but these errors were encountered:
See https://golang.org/cl/8241043
This now reports:
gotype x.go
x.go:5:23: invalid operation: shifted operand 1 (type float64) must be integer
x.go:5:15: cannot initialize x (type int) with complex(1 << s, 2) (value of type
complex128)
The text was updated successfully, but these errors were encountered: