2011-05-11 21:41:59 -06:00
|
|
|
// 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{}
|
2011-11-06 14:13:54 -07:00
|
|
|
switch t := x.(type) { // GC_ERROR "is not a type"
|
2011-09-23 22:23:40 -06:00
|
|
|
case 0: // GCCGO_ERROR "expected type"
|
2011-10-31 11:09:40 -06:00
|
|
|
t.x = 1 // ERROR "type interface \{\}|reference to undefined field or method"
|
2011-05-11 21:41:59 -06:00
|
|
|
}
|
|
|
|
}
|