Russ Cox | 1163b1d | 2008-10-16 15:59:31 -0700 | [diff] [blame] | 1 | // errchk $G $D/$F.go |
| 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 |
| 8 | |
Russ Cox | 9dc22b6 | 2009-08-03 11:58:52 -0700 | [diff] [blame] | 9 | var a = []int { "a" }; // ERROR "conver|incompatible|cannot" |
Russ Cox | be2edb5 | 2009-03-03 08:39:12 -0800 | [diff] [blame] | 10 | var b = int { 1 }; // ERROR "compos" |
Russ Cox | 1163b1d | 2008-10-16 15:59:31 -0700 | [diff] [blame] | 11 | |
| 12 | |
Russ Cox | f48cbfd | 2009-01-16 16:12:14 -0800 | [diff] [blame] | 13 | func f() int |
| 14 | |
Russ Cox | 1163b1d | 2008-10-16 15:59:31 -0700 | [diff] [blame] | 15 | func main() { |
Russ Cox | 9dc22b6 | 2009-08-03 11:58:52 -0700 | [diff] [blame] | 16 | if f < 1 { } // ERROR "conver|incompatible|invalid" |
Russ Cox | 1163b1d | 2008-10-16 15:59:31 -0700 | [diff] [blame] | 17 | } |