1// errorcheck
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// Verify that illegal function signatures are detected.
8// Does not compile.
9
10package main
11
12type t1 int
13type t2 int
14type t3 int
15
16func f1(*t2, x t3)	// ERROR "named"
17func f2(t1, *t2, x t3)	// ERROR "named"
18func f3() (x int, *string)	// ERROR "named"
19
20func f4() (t1 t1)	// legal - scope of parameter named t1 starts in body of f4.
21