blob: 056ff9877d39e83624a514ee3ae1cb24b0554426 [file] [log] [blame]
Robert Griesemere92b7532008-06-06 15:53:14 -07001// errchk $G $F.go
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
Rob Pike6810f392008-07-08 12:22:21 -07007// does not compile and should not compile
8
Robert Griesemere92b7532008-06-06 15:53:14 -07009package main
10
Russ Coxf2b5a072011-01-19 23:09:00 -050011func f1(a int) (int, float32) { // BUG (not caught by compiler): multiple return values must have names
Rob Pike4f61fc92010-09-04 10:36:13 +100012 return 7, 7.0
Robert Griesemere92b7532008-06-06 15:53:14 -070013}
14
15
Russ Coxf2b5a072011-01-19 23:09:00 -050016func f2(a int) (a int, b float32) { // ERROR "redeclared|definition"
Rob Pike4f61fc92010-09-04 10:36:13 +100017 return 8, 8.0
Robert Griesemere92b7532008-06-06 15:53:14 -070018}