Russ Cox | e780fa8 | 2009-09-09 01:01:39 -0700 | [diff] [blame] | 1 | // errchk $G -e $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 | |
| 9 | func main() { |
Rob Pike | 325cf8e | 2010-03-24 16:46:53 -0700 | [diff] [blame] | 10 | var n byte // ERROR "not a type|expected type" |
| 11 | var y = float(0) // ERROR "cannot call|expected function" |
Russ Cox | e780fa8 | 2009-09-09 01:01:39 -0700 | [diff] [blame] | 12 | const ( |
Rob Pike | 325cf8e | 2010-03-24 16:46:53 -0700 | [diff] [blame] | 13 | a = 1 + iota // ERROR "string|incompatible types" |
Russ Cox | e780fa8 | 2009-09-09 01:01:39 -0700 | [diff] [blame] | 14 | ) |
| 15 | |
| 16 | } |
| 17 | |
| 18 | const ( |
Rob Pike | 325cf8e | 2010-03-24 16:46:53 -0700 | [diff] [blame] | 19 | bool = 1 |
| 20 | byte = 2 |
| 21 | float = 3 |
| 22 | float32 = 4 |
| 23 | float64 = 5 |
| 24 | int = 6 |
| 25 | int8 = 7 |
| 26 | int16 = 8 |
| 27 | int32 = 9 |
| 28 | int64 = 10 |
| 29 | uint = 11 |
| 30 | uint8 = 12 |
| 31 | uint16 = 13 |
| 32 | uint32 = 14 |
| 33 | uint64 = 15 |
| 34 | uintptr = 16 |
| 35 | true = 17 |
| 36 | false = 18 |
| 37 | iota = "abc" |
| 38 | nil = 20 |
| 39 | cap = 21 |
| 40 | len = 22 |
| 41 | make = 23 |
| 42 | new = 24 |
| 43 | panic = 25 |
| 44 | print = 26 |
| 45 | println = 27 |
Russ Cox | e780fa8 | 2009-09-09 01:01:39 -0700 | [diff] [blame] | 46 | ) |