Source file test/fixedbugs/bug388a.go

     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 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  
    17  func 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  
    22  func main() {
    23  }
    24  

View as plain text