blob: 2d908f4c8b56c7c6ab799080a5c863bfd5a234d5 [file] [log] [blame]
Dan Willemsenbc60c3c2021-12-15 01:09:00 -08001// 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
5package p
6
7func g() {
8 var s string
9 var i int
10 _ = s /* ERROR invalid operation: s \+ i \(mismatched types string and int\) */ + i
11}
12
13func f(i int) int {
14 i /* ERROR invalid operation: i \+= "1" \(mismatched types int and untyped string\) */ += "1"
15 return i
16}