On Sun, Dec 30, 2018 at 12:05 PM Ian Lance Taylor wrote:
> On Sat, Dec 29, 2018 at 11:12 PM Caleb Spare wrote:
> >
> > I noticed the following:
> >
> > package main
> >
> > func main() {
> > x := float64(1 << 3) // fine (constant expression)
> >
> > v := uint(3)
> > x = float64(1 << v) // invali
On Sat, Dec 29, 2018 at 11:12 PM Caleb Spare wrote:
>
> I noticed the following:
>
> package main
>
> func main() {
> x := float64(1 << 3) // fine (constant expression)
>
> v := uint(3)
> x = float64(1 << v) // invalid operation: 1 << uint(v) (shift of type float64)
>
> _ = x
> }
>
> (playground: