2011-07-28 18:41:18 -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.
|
|
|
|
|
|
|
|
// check that compiler doesn't stop reading struct def
|
|
|
|
// after first unknown type.
|
|
|
|
|
|
|
|
// Fixes issue 2110.
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
type S struct {
|
2011-10-27 20:41:39 -06:00
|
|
|
err foo.Bar // ERROR "undefined|expected package"
|
2011-07-28 18:41:18 -06:00
|
|
|
Num int
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
s := S{}
|
2011-10-27 20:41:39 -06:00
|
|
|
_ = s.Num // no error here please
|
2011-07-28 18:41:18 -06:00
|
|
|
}
|