1// errorcheck
2
3// Copyright 2009 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 P
8
9var x int
10
11func foo() {
12	print(P.x);  // ERROR "undefined"
13}
14
15/*
16uetli:~/Source/go1/test/bugs gri$ 6g bug085.go
17bug085.go:6: P: undefined
18Bus error
19*/
20
21/* expected scope hierarchy (outermost to innermost)
22
23universe scope (contains predeclared identifiers int, float32, int32, len, etc.)
24"solar" scope (just holds the package name P so it can be found but doesn't conflict)
25global scope (the package global scope)
26local scopes (function scopes)
27*/
28