github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/vet/testdata/shift/shift.go (about) 1 // Copyright 2014 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // This file contains tests for the suspicious shift checker. 6 7 package shift 8 9 func ShiftTest() { 10 var i8 int8 11 _ = i8 << 7 12 _ = (i8 + 1) << 8 // ERROR ".i8 . 1. .8 bits. too small for shift of 8" 13 }