Source file test/fixedbugs/issue33308.go

     1  // errorcheck
     2  
     3  // Copyright 2020 The Go Authors. All rights reserved.  Use of this
     4  // source code is governed by a BSD-style license that can be found in
     5  // the LICENSE file.
     6  
     7  // Test that the compiler does not crash on a []byte conversion of an
     8  // untyped expression.
     9  package p
    10  
    11  var v uint
    12  var x = []byte((1 << v) + 1) // ERROR "cannot convert|non-integer type for left operand of shift"
    13  

View as plain text