From: Robert Griesemer Date: Thu, 25 Sep 2008 22:45:19 +0000 (-0700) Subject: bug: package identifier not visible X-Git-Tag: weekly.2009-11-06~3121 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b6429768c65eed9f0c16faba3ceeb21ea112a951;p=gostls13.git bug: package identifier not visible (should be in the scope chain like any other identifier) R=r DELTA=16 (16 added, 0 deleted, 0 changed) OCL=15884 CL=15884 --- diff --git a/test/bugs/bug105.go b/test/bugs/bug105.go new file mode 100644 index 0000000000..bbafc039fa --- /dev/null +++ b/test/bugs/bug105.go @@ -0,0 +1,20 @@ +// 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) +*/