2012-02-18 20:28:53 -07:00
|
|
|
// compile
|
2008-09-30 15:08:43 -06: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-18 20:28:53 -07:00
|
|
|
// Test function signatures.
|
|
|
|
// Compiled but not run.
|
|
|
|
|
2008-09-30 15:08:43 -06:00
|
|
|
package main
|
|
|
|
|
2010-09-03 18:36:13 -06:00
|
|
|
type t1 int
|
|
|
|
type t2 int
|
|
|
|
type t3 int
|
2008-09-30 15:08:43 -06:00
|
|
|
|
2010-09-03 18:36:13 -06: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 15:08:43 -06:00
|
|
|
|
|
|
|
func f9(os int) int {
|
|
|
|
return os
|
|
|
|
}
|
2011-11-01 20:06:05 -06:00
|
|
|
func f10(err error) error {
|
2008-09-30 15:08:43 -06:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
func f11(t1 string) string {
|
|
|
|
return t1
|
|
|
|
}
|