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 9package main 10import "runtime" 11 12func bar(i int) { 13 runtime.UintType := i // ERROR "non-name runtime.UintType|non-name on left side|undefined" 14 println(runtime.UintType) // ERROR "invalid use of type|undefined" 15} 16 17func baz() { 18 main.i := 1 // ERROR "non-name main.i|non-name on left side|undefined" 19 println(main.i) // ERROR "no fields or methods|undefined" 20} 21 22func main() { 23} 24