diff options
Diffstat (limited to 'test/func1.go')
-rw-r--r-- | test/func1.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/func1.go b/test/func1.go index 2f92c35b7..895fe94b8 100644 --- a/test/func1.go +++ b/test/func1.go @@ -4,13 +4,15 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// does not compile and should not compile + package main -func f1(a int) (int, float) { // BUG multiple return values must have names +func f1(a int) (int, float) { // BUG (not caught by compiler): multiple return values must have names return 7, 7.0; } -func f2(a int) (a int, b float) { // BUG return value names must be different from parameter names +func f2(a int) (a int, b float) { // return value names must be different from parameter names return 8, 8.0; } |