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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 700 jeremybenn
// errchk $G $D/$F.go
2
 
3
// Copyright 2011 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
// Issue 2231
8
 
9
package main
10
import "runtime"
11
 
12
func foo(runtime.UintType, i int) {  // ERROR "cannot declare name runtime.UintType|named/anonymous mix"
13
        println(i, runtime.UintType)
14
}
15
 
16
func bar(i int) {
17
        runtime.UintType := i       // ERROR "cannot declare name runtime.UintType|non-name on left side"
18
        println(runtime.UintType)       // GCCGO_ERROR "invalid use of type"
19
}
20
 
21
func baz() {
22
        main.i := 1     // ERROR "non-name main.i|non-name on left side"
23
        println(main.i) // GCCGO_ERROR "no fields or methods"
24
}
25
 
26
func qux() {
27
        var main.i      // ERROR "unexpected [.]|expected type"
28
        println(main.i)
29
}
30
 
31
func corge() {
32
        var foo.i int  // ERROR "unexpected [.]|expected type"
33
        println(foo.i)
34
}
35
 
36
func main() {
37
        foo(42,43)
38
        bar(1969)
39
}

powered by: WebSVN 2.1.0

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