Source file test/fixedbugs/issue31412b.go
1 // errorcheck 2 3 // Copyright 2019 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 7 // This code was incorrectly accepted by gccgo. 8 9 package main 10 11 type N string 12 type M string 13 14 const B N = "B" 15 const C M = "C" 16 17 func main() { 18 q := B + C // ERROR "mismatched types|incompatible types" 19 println(q) 20 } 21