mirror of
https://github.com/golang/go
synced 2024-11-19 20:14:43 -07:00
8a06936ea1
bug340.go:14:7: error: expected type bug340.go:15:4: error: reference to undefined field or method ‘x’ bug350.go:12:1: error: redefinition of ‘m’ bug350.go:11:1: note: previous definition of ‘m’ was here bug350.go:15:1: error: redefinition of ‘p’ bug350.go:14:1: note: previous definition of ‘p’ was here bug351.go:12:6: error: non-name on left side of ‘:=’ R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5127041
14 lines
286 B
Go
14 lines
286 B
Go
// errchk $G $D/$F.go
|
|
|
|
// Copyright 2011 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.
|
|
|
|
package main
|
|
|
|
var x int
|
|
|
|
func main() {
|
|
(x) := 0 // ERROR "non-name [(]x[)]|non-name on left side"
|
|
}
|