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 9package main 10 11type N string 12type M string 13 14const B N = "B" 15const C M = "C" 16 17func main() { 18 q := B + C // ERROR "mismatched types|incompatible types" 19 println(q) 20} 21