OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [go.test/] [test/] [fixedbugs/] [bug085.go] - Blame information for rev 858

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.