2012-02-17 04:49:59 +00:00
|
|
|
// errorcheck
|
2011-11-28 17:22:15 +00:00
|
|
|
|
2016-04-10 21:32:26 +00:00
|
|
|
// Copyright 2011 The Go Authors. All rights reserved.
|
2011-11-28 17:22:15 +00:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
// Issue 2452.
|
|
|
|
|
|
|
|
// Check that the error messages says
|
2011-12-07 21:18:50 +00:00
|
|
|
// bug378.go:17: 1 + 2 not used
|
2011-11-28 17:22:15 +00:00
|
|
|
// and not
|
|
|
|
// bug378.go:17: 1 not used
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
func main() {
|
2020-12-10 04:14:07 +00:00
|
|
|
1 + 2 // ERROR "1 \+ 2 evaluated but not used|value computed is not used|is not used"
|
2011-11-28 17:22:15 +00:00
|
|
|
}
|