<commit_before><commit_msg>bug: package identifier not visible (should be in the scope chain like any other identifier)<commit_after>// Copyright 2009 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.

// $G $D/$F.go || echo BUG: should compile

package P

var x int

func f() int {
	return P.x  // P should be visible
}

/*
uetli:~/Source/go1/test/bugs gri$ 6g bug105.go
bug105.go:8: P: undefined
bug105.go:9: illegal types for operand: RETURN
	(<int32>INT32)
*/
{'fraction_non_alphanumeric': 0.10810810810810811, 'fraction_numerical': 0.03783783783783784, 'mean_word_length': 3.6333333333333333, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '767128', 'n_tokens_mistral': 197, 'n_tokens_neox': 179, 'n_words': 76}