github.com/xushiwei/go@v0.0.0-20130601165731-2b9d83f45bc9/test/func2.go (about) 1 // compile 2 3 // Copyright 2009 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 // Test function signatures. 8 // Compiled but not run. 9 10 package main 11 12 type t1 int 13 type t2 int 14 type t3 int 15 16 func f1(t1, t2, t3) 17 func f2(t1, t2, t3 bool) 18 func f3(t1, t2, x t3) 19 func f4(t1, *t3) 20 func (x *t1) f5(y []t2) (t1, *t3) 21 func f6() (int, *string) 22 func f7(*t2, t3) 23 func f8(os int) int 24 25 func f9(os int) int { 26 return os 27 } 28 func f10(err error) error { 29 return err 30 } 31 func f11(t1 string) string { 32 return t1 33 }