mirror of
https://github.com/golang/go
synced 2024-11-22 09:14:40 -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
18 lines
428 B
Go
18 lines
428 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.
|
|
|
|
// Issue 1606.
|
|
|
|
package main
|
|
|
|
func main() {
|
|
var x interface{}
|
|
switch t := x.(type) { // GC_ERROR "0 is not a type"
|
|
case 0: // GCCGO_ERROR "expected type"
|
|
t.x = 1 // ERROR "type interface \{ \}|reference to undefined field or method"
|
|
}
|
|
}
|