2012-10-07 08:47:53 -06:00
|
|
|
// errorcheck
|
|
|
|
|
2016-04-10 15:32:26 -06:00
|
|
|
// Copyright 2012 The Go Authors. All rights reserved.
|
2012-10-07 08:47:53 -06:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import "os"
|
|
|
|
|
2020-12-09 21:14:07 -07:00
|
|
|
var _ = os.Open // avoid imported and not used error
|
|
|
|
|
2012-10-07 08:47:53 -06:00
|
|
|
type T struct {
|
|
|
|
File int
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
_ = T {
|
2020-12-09 21:14:07 -07:00
|
|
|
os.File: 1, // ERROR "unknown T? ?field|invalid field"
|
2012-10-07 08:47:53 -06:00
|
|
|
}
|
|
|
|
}
|