1// errorcheck
2
3// Copyright 2012 The Go Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7package main
8
9import "os"
10
11var _ = os.Open // avoid imported and not used error
12
13type T struct {
14	File int
15}
16
17func main() {
18	_ = T{
19		os.File: 1, // ERROR "invalid field name os.File|unknown field"
20	}
21}
22