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() {
|
2020-12-13 11:35:20 -07:00
|
|
|
_ = T{
|
|
|
|
os.File: 1, // ERROR "invalid field name os.File|unknown field"
|
2012-10-07 08:47:53 -06:00
|
|
|
}
|
|
|
|
}
|