| 
									
										
										
										
											2016-08-16 16:33:05 -07:00
										 |  |  | // errorcheck | 
					
						
							| 
									
										
										
										
											2011-01-31 18:52:16 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-10 14:32:26 -07:00
										 |  |  | // Copyright 2010 The Go Authors. All rights reserved. | 
					
						
							| 
									
										
										
										
											2011-01-31 18:52:16 -05: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 16:33:05 -07:00
										 |  |  | 	if c <- v { // ERROR "used as value|missing condition|invalid condition" | 
					
						
							| 
									
										
										
										
											2011-01-31 18:52:16 -05:00
										 |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-16 16:33:05 -07:00
										 |  |  | var _ = c <- v // ERROR "used as value|unexpected <-" |