From 5ff4c17907d5b19510a62e08fd8d3b11e62b431d Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Tue, 13 Sep 2011 13:13:40 +0200 Subject: Imported Upstream version 60 --- test/func3.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/func3.go (limited to 'test/func3.go') diff --git a/test/func3.go b/test/func3.go new file mode 100644 index 000000000..110b0ef1c --- /dev/null +++ b/test/func3.go @@ -0,0 +1,17 @@ +// errchk $G $F.go + +// 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. + +package main + +type t1 int +type t2 int +type t3 int + +func f1(*t2, x t3) // ERROR "named" +func f2(t1, *t2, x t3) // ERROR "named" +func f3() (x int, *string) // ERROR "named" + +func f4() (t1 t1) // legal - scope of parameter named t1 starts in body of f4. -- cgit v1.2.3