Russ Cox | 8080384 | 2012-02-16 23:49:59 -0500 | [diff] [blame] | 1 | // errorcheck |
Rémy Oudompheng | 60e4a61 | 2011-11-28 12:22:15 -0500 | [diff] [blame] | 2 | |
Emmanuel Odeke | 53fd522 | 2016-04-10 14:32:26 -0700 | [diff] [blame] | 3 | // Copyright 2011 The Go Authors. All rights reserved. |
Rémy Oudompheng | 60e4a61 | 2011-11-28 12:22:15 -0500 | [diff] [blame] | 4 | // 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 Oudompheng | 4349eff | 2011-12-07 16:18:50 -0500 | [diff] [blame] | 10 | // bug378.go:17: 1 + 2 not used |
Rémy Oudompheng | 60e4a61 | 2011-11-28 12:22:15 -0500 | [diff] [blame] | 11 | // and not |
| 12 | // bug378.go:17: 1 not used |
| 13 | |
| 14 | package main |
| 15 | |
| 16 | func main() { |
Robert Griesemer | 5aca6e7 | 2020-12-09 20:14:07 -0800 | [diff] [blame] | 17 | 1 + 2 // ERROR "1 \+ 2 evaluated but not used|value computed is not used|is not used" |
Rémy Oudompheng | 60e4a61 | 2011-11-28 12:22:15 -0500 | [diff] [blame] | 18 | } |