cmd/gc: Don't accept qualified names as literal keys

Fixes #4067.

R=golang-dev, minux.ma, dave, rsc
CC=golang-dev
https://golang.org/cl/6622056
This commit is contained in:
Daniel Morsing 2012-10-07 16:47:53 +02:00
parent d7b7957db1
commit 87c35d8df1
2 changed files with 25 additions and 4 deletions

19
test/fixedbugs/bug462.go Normal file
View file

@ -0,0 +1,19 @@
// errorcheck
// Copyright 2012 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.
package main
import "os"
type T struct {
File int
}
func main() {
_ = T {
os.File: 1, // ERROR "unknown T field"
}
}