2016-08-16 17:33:05 -06:00
|
|
|
// errorcheck
|
2011-01-31 16:52:16 -07:00
|
|
|
|
2016-04-10 15:32:26 -06:00
|
|
|
// Copyright 2010 The Go Authors. All rights reserved.
|
2011-01-31 16:52:16 -07:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
var c chan int
|
|
|
|
var v int
|
|
|
|
|
|
|
|
func main() {
|
2016-08-16 17:33:05 -06:00
|
|
|
if c <- v { // ERROR "used as value|missing condition|invalid condition"
|
2011-01-31 16:52:16 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-08-16 17:33:05 -06:00
|
|
|
var _ = c <- v // ERROR "used as value|unexpected <-"
|