mirror of
https://github.com/golang/go
synced 2024-11-15 03:20:31 -07:00
bae2e968e2
Fixes #69506. Change-Id: I18215e11f214b12d5f65be1d1740181e427f8817 Reviewed-on: https://go-review.googlesource.com/c/go/+/617015 Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
30 lines
635 B
Go
30 lines
635 B
Go
// errorcheck
|
|
|
|
// Copyright 2011 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.
|
|
|
|
// Issue 2231
|
|
|
|
package main
|
|
import "runtime"
|
|
|
|
func foo(runtime.UintType, i int) { // ERROR "cannot declare name runtime.UintType|missing parameter name|undefined identifier"
|
|
println(i, runtime.UintType) // GCCGO_ERROR "undefined identifier"
|
|
}
|
|
|
|
func qux() {
|
|
var main.i // ERROR "unexpected [.]|expected type"
|
|
println(main.i)
|
|
}
|
|
|
|
func corge() {
|
|
var foo.i int // ERROR "unexpected [.]|expected type"
|
|
println(foo.i)
|
|
}
|
|
|
|
func main() {
|
|
foo(42,43)
|
|
bar(1969)
|
|
}
|