1
0
mirror of https://github.com/golang/go synced 2024-09-23 19:10:13 -06:00
go/test/rename1.go
Rob Pike 19bab1dc78 test/[n-r]*.go: add documentation
The rename ones needed redoing.

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5698054
2012-02-24 10:30:39 +11:00

62 lines
796 B
Go

// 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"
)