| 
									
										
										
										
											2012-02-19 14:28:53 +11:00
										 |  |  | // compile | 
					
						
							| 
									
										
										
										
											2008-09-30 14:08:43 -07: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 14:28:53 +11:00
										 |  |  | // Test function signatures. | 
					
						
							|  |  |  | // Compiled but not run. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-09-30 14:08:43 -07:00
										 |  |  | package main | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-04 10:36:13 +10:00
										 |  |  | type t1 int | 
					
						
							|  |  |  | type t2 int | 
					
						
							|  |  |  | type t3 int | 
					
						
							| 
									
										
										
										
											2008-09-30 14:08:43 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-04 10:36:13 +10:00
										 |  |  | func f1(t1, t2, t3) | 
					
						
							|  |  |  | func f2(t1, t2, t3 bool) | 
					
						
							|  |  |  | func f3(t1, t2, x t3) | 
					
						
							|  |  |  | func f4(t1, *t3) | 
					
						
							|  |  |  | func (x *t1) f5(y []t2) (t1, *t3) | 
					
						
							|  |  |  | func f6() (int, *string) | 
					
						
							|  |  |  | func f7(*t2, t3) | 
					
						
							|  |  |  | func f8(os int) int | 
					
						
							| 
									
										
										
										
											2008-09-30 14:08:43 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | func f9(os int) int { | 
					
						
							|  |  |  | 	return os | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2011-11-01 22:06:05 -04:00
										 |  |  | func f10(err error) error { | 
					
						
							| 
									
										
										
										
											2008-09-30 14:08:43 -07:00
										 |  |  | 	return err | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | func f11(t1 string) string { | 
					
						
							|  |  |  | 	return t1 | 
					
						
							|  |  |  | } |