2012-10-07 16:47:53 +02:00
|
|
|
// errorcheck
|
|
|
|
|
2016-04-10 14:32:26 -07:00
|
|
|
// Copyright 2012 The Go Authors. All rights reserved.
|
2012-10-07 16:47:53 +02: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 20:14:07 -08:00
|
|
|
var _ = os.Open // avoid imported and not used error
|
|
|
|
|
2012-10-07 16:47:53 +02:00
|
|
|
type T struct {
|
|
|
|
File int
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
2020-12-13 10:35:20 -08:00
|
|
|
_ = T{
|
|
|
|
os.File: 1, // ERROR "invalid field name os.File|unknown field"
|
2012-10-07 16:47:53 +02:00
|
|
|
}
|
|
|
|
}
|