2012-02-17 04:48:57 +00:00
|
|
|
// errorcheck
|
2009-09-09 06:16:19 +00:00
|
|
|
|
|
|
|
// Copyright 2009 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.
|
|
|
|
|
2012-02-19 02:19:43 +00:00
|
|
|
// Test that incorrect uses of the blank identifer are caught.
|
|
|
|
// Does not compile.
|
|
|
|
|
2009-09-09 06:16:19 +00:00
|
|
|
package _ // ERROR "invalid package name _"
|
|
|
|
|
|
|
|
func main() {
|
2010-09-04 00:36:13 +00:00
|
|
|
_() // ERROR "cannot use _ as value"
|
|
|
|
x := _+1 // ERROR "cannot use _ as value"
|
2012-01-22 19:50:45 +00:00
|
|
|
_ = x
|
2009-09-09 06:16:19 +00:00
|
|
|
}
|