Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
044a3b1a
Commit
044a3b1a
authored
Aug 05, 2008
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug: package name not visible
R=r OCL=13898 CL=13898
parent
28547615
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
4 deletions
+35
-4
test/bugs/bug085.go
test/bugs/bug085.go
+27
-0
test/golden.out
test/golden.out
+8
-4
No files found.
test/bugs/bug085.go
0 → 100644
View file @
044a3b1a
// errchk $G $D/$F.go
// 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.
package
P
var
x
int
func
foo
()
{
print
P
.
x
;
// P should be defined between the outermost "universe" scope and the global scope
}
/*
uetli:~/Source/go1/test/bugs gri$ 6g bug085.go
bug085.go:6: P: undefined
Bus error
*/
/* expected scope hierarchy (outermost to innermost)
universe scope (contains predeclared identifiers int, float, int32, len, etc.)
"solar" scope (just holds the package name P so it can be found but doesn't conflict)
global scope (the package global scope)
local scopes (function scopes)
*/
test/golden.out
View file @
044a3b1a
...
...
@@ -211,10 +211,10 @@ inner loop top i 0
do break
outer loop top k 1
k not zero
panic on line 3
05
PC=0x1362
panic on line 3
10
PC=0x1362
0x1362?zi
main·main(1, 0, 160641
495
2, ...)
main·main(0x1, 0x7fff5fbff
26
8, 0x0, ...)
main·main(1, 0, 160641
639
2, ...)
main·main(0x1, 0x7fff5fbff
80
8, 0x0, ...)
BUG: crashes
=========== bugs/bug072.go
...
...
@@ -255,6 +255,10 @@ BUG: fails incorrectly
=========== bugs/bug083.go
=========== bugs/bug085.go
bugs/bug085.go:8: P: undefined
BUG: fails incorrectly
=========== fixedbugs/bug000.go
=========== fixedbugs/bug001.go
...
...
@@ -318,7 +322,7 @@ fixedbugs/bug035.go:7: var f redeclared in this block
=========== fixedbugs/bug037.go
fixedbugs/bug037.go:6: vlong: undefined
fixedbugs/bug037.go:6: fatal error: addvar: n=NAME-s G0 a(1) l(30
1
) t=<T> nil
fixedbugs/bug037.go:6: fatal error: addvar: n=NAME-s G0 a(1) l(30
6
) t=<T> nil
=========== fixedbugs/bug038.go
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment