blob: f239999986078934d4b85195f56249cd636ab745 [file] [log] [blame]
Russ Coxe780fa82009-09-09 01:01:39 -07001// 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
7package main
8
9func main() {
Rob Pike325cf8e2010-03-24 16:46:53 -070010 var n byte // ERROR "not a type|expected type"
11 var y = float(0) // ERROR "cannot call|expected function"
Russ Coxe780fa82009-09-09 01:01:39 -070012 const (
Rob Pike325cf8e2010-03-24 16:46:53 -070013 a = 1 + iota // ERROR "string|incompatible types"
Russ Coxe780fa82009-09-09 01:01:39 -070014 )
15
16}
17
18const (
Rob Pike325cf8e2010-03-24 16:46:53 -070019 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 Coxe780fa82009-09-09 01:01:39 -070046)