blob: b5966a91f6065e58030908746c5b996615635a4f [file] [log] [blame]
Rob Pike83976e32012-02-19 14:28:53 +11001// compile
Russ Cox5ed04d72008-09-30 14:08:43 -07002
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
Rob Pike83976e32012-02-19 14:28:53 +11007// Test function signatures.
8// Compiled but not run.
9
Russ Cox5ed04d72008-09-30 14:08:43 -070010package main
Russ Cox5ed04d72008-09-30 14:08:43 -070011
Rob Pike4f61fc92010-09-04 10:36:13 +100012type t1 int
13type t2 int
14type t3 int
Russ Cox5ed04d72008-09-30 14:08:43 -070015
Rob Pike4f61fc92010-09-04 10:36:13 +100016func f1(t1, t2, t3)
17func f2(t1, t2, t3 bool)
18func f3(t1, t2, x t3)
19func f4(t1, *t3)
20func (x *t1) f5(y []t2) (t1, *t3)
21func f6() (int, *string)
22func f7(*t2, t3)
23func f8(os int) int
Russ Cox5ed04d72008-09-30 14:08:43 -070024
25func f9(os int) int {
26 return os
27}
Russ Cox44526cd2011-11-01 22:06:05 -040028func f10(err error) error {
Russ Cox5ed04d72008-09-30 14:08:43 -070029 return err
30}
31func f11(t1 string) string {
32 return t1
33}