summaryrefslogtreecommitdiff
path: root/test/rename1.go
blob: 48262fd2b55251f9dd02d5dbc072a41bb8e90c41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// errorcheck

// Copyright 2009 The Go Authors.  All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Verify that renamed identifiers no longer have their old meaning.
// Does not compile.

package main

func main() {
	var n byte       // ERROR "not a type|expected type"
	var y = float32(0) // ERROR "cannot call|expected function"
	const (
		a = 1 + iota // ERROR "string|incompatible types" "convert iota"
	)

}

const (
	append = iota
	bool
	byte
	complex
	complex64
	complex128
	cap
	close
	delete
	error
	false
	float32
	float64
	imag
	int
	int8
	int16
	int32
	int64
	len
	make
	new
	nil
	panic
	print
	println
	real
	recover
	rune
	string
	true
	uint
	uint8
	uint16
	uint32
	uint64
	uintptr
	NUM
	iota = "123"
)