1 // Copyright 2021 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 package p 6 7 func g() { 8 var s string 9 var i int 10 _ = s /* ERROR "invalid operation: s + i (mismatched types string and int)" */ + i 11 } 12 13 func f(i int) int { 14 i /* ERROR `invalid operation: i += "1" (mismatched types int and untyped string)` */ += "1" 15 return i 16 } 17