]> Cypherpunks.ru repositories - gostls13.git/blob - test/rename1.go
test/[n-r]*.go: add documentation
[gostls13.git] / test / rename1.go
1 // errorcheck
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 // Verify that renamed identifiers no longer have their old meaning.
8 // Does not compile.
9
10 package main
11
12 func main() {
13         var n byte       // ERROR "not a type|expected type"
14         var y = float32(0) // ERROR "cannot call|expected function"
15         const (
16                 a = 1 + iota // ERROR "string|incompatible types" "convert iota"
17         )
18
19 }
20
21 const (
22         append = iota
23         bool
24         byte
25         complex
26         complex64
27         complex128
28         cap
29         close
30         delete
31         error
32         false
33         float32
34         float64
35         imag
36         int
37         int8
38         int16
39         int32
40         int64
41         len
42         make
43         new
44         nil
45         panic
46         print
47         println
48         real
49         recover
50         rune
51         string
52         true
53         uint
54         uint8
55         uint16
56         uint32
57         uint64
58         uintptr
59         NUM
60         iota = "123"
61 )