Russ Cox | 2b1c9b4 | 2012-02-16 23:49:30 -0500 | [diff] [blame] | 1 | // errorcheck |
Ian Lance Taylor | 79606b9 | 2009-08-26 16:24:51 -0700 | [diff] [blame] | 2 | |
| 3 | // Copyright 2009 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 | package main |
Russ Cox | 680ee6a | 2009-10-08 23:03:34 -0700 | [diff] [blame] | 8 | func f(a T) T { return a } // ERROR "undefined" |
Ian Lance Taylor | 79606b9 | 2009-08-26 16:24:51 -0700 | [diff] [blame] | 9 | func main() { |
| 10 | x := f(0); |
Russ Cox | 680ee6a | 2009-10-08 23:03:34 -0700 | [diff] [blame] | 11 | _ = x; |
Ian Lance Taylor | 79606b9 | 2009-08-26 16:24:51 -0700 | [diff] [blame] | 12 | } |