1// run 2 3// Copyright 2023 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. 6 7package main 8 9func boolInt32(b bool) int32 { 10 if b { 11 return 1 12 } 13 14 return 0 15} 16 17func f(left uint16, right int32) (r uint16) { 18 return left >> right 19} 20 21var n = uint16(65535) 22 23func main() { 24 println(f(n, boolInt32(int64(n^n) > 1))) 25} 26