3 // Copyright 2022 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Test that the compiler's noder uses the correct type
8 // for RHS shift operands that are untyped. Must compile;
9 // run for good measure.
20 panic(fmt.Sprintf("%d != %d", x, y))
37 const M = math.MaxUint
38 f(x<<(M+0), 0) // shift by untyped int representable as uint
39 f(x<<(M+0.), 0) // shift by untyped float representable as uint
40 f(x<<(M+0.+0i), 0) // shift by untyped complex representable as uint