| 1 |
// errorcheck |
| 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|missing parameter name|undefined identifier" |
| 13 |
println(i, runtime.UintType) // GCCGO_ERROR "undefined identifier" |
| 14 |
} |
| 15 |
|
| 16 |
func qux() { |
| 17 |
var main.i // ERROR "unexpected [.]|expected type" |
| 18 |
println(main.i) |
| 19 |
} |
| 20 |
|
| 21 |
func corge() { |
| 22 |
var foo.i int // ERROR "unexpected [.]|expected type" |
| 23 |
println(foo.i) |
| 24 |
} |
| 25 |
|
| 26 |
func main() { |
| 27 |
foo(42,43) |
| 28 |
bar(1969) |
| 29 |
} |