Russ Cox | 8080384 | 2012-02-16 23:49:59 -0500 | [diff] [blame] | 1 | // errorcheck |
Russ Cox | 8133cb3 | 2011-04-28 13:14:35 -0400 | [diff] [blame] | 2 | |
Emmanuel Odeke | 53fd522 | 2016-04-10 14:32:26 -0700 | [diff] [blame] | 3 | // Copyright 2011 The Go Authors. All rights reserved. |
Russ Cox | 8133cb3 | 2011-04-28 13:14:35 -0400 | [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 1722. |
| 8 | |
| 9 | // Check that the error messages says |
| 10 | // bug337.go:16: len("foo") not used |
| 11 | // and not |
| 12 | // bug337.go:16: 3 not used |
| 13 | |
| 14 | package main |
| 15 | |
| 16 | func main() { |
Ian Lance Taylor | c55d0c4 | 2011-09-20 09:31:07 -0700 | [diff] [blame] | 17 | len("foo") // ERROR "len|value computed is not used" |
Russ Cox | 8133cb3 | 2011-04-28 13:14:35 -0400 | [diff] [blame] | 18 | } |
| 19 | |