blob: aa078b6ff45c30158817a9268f36ccc48ab97c60 [file] [log] [blame]
Russ Cox80803842012-02-16 23:49:59 -05001// errorcheck
Rémy Oudompheng60e4a612011-11-28 12:22:15 -05002
Emmanuel Odeke53fd5222016-04-10 14:32:26 -07003// Copyright 2011 The Go Authors. All rights reserved.
Rémy Oudompheng60e4a612011-11-28 12:22:15 -05004// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7// Issue 2452.
8
9// Check that the error messages says
Rémy Oudompheng4349eff2011-12-07 16:18:50 -050010// bug378.go:17: 1 + 2 not used
Rémy Oudompheng60e4a612011-11-28 12:22:15 -050011// and not
12// bug378.go:17: 1 not used
13
14package main
15
16func main() {
Robert Griesemer5aca6e72020-12-09 20:14:07 -080017 1 + 2 // ERROR "1 \+ 2 evaluated but not used|value computed is not used|is not used"
Rémy Oudompheng60e4a612011-11-28 12:22:15 -050018}