blob: 3fccd1728883dc72356ece64272503c94332e088 [file] [log] [blame]
Russ Cox2b1c9b42012-02-16 23:49:30 -05001// errorcheck
Russ Coxd122bb22009-12-15 14:26:50 -08002
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
7package main
8
Russ Cox6672b402010-06-14 11:23:11 -07009func f(x int, y ...int) // ok
Russ Coxd122bb22009-12-15 14:26:50 -080010
Ian Lance Taylorcc5682d2012-12-13 15:11:31 -080011func g(x int, y float32) (...) // ERROR "[.][.][.]" "final argument"
Russ Coxd122bb22009-12-15 14:26:50 -080012
Russ Cox6672b402010-06-14 11:23:11 -070013func h(x, y ...int) // ERROR "[.][.][.]"
Russ Coxd122bb22009-12-15 14:26:50 -080014
Ian Lance Taylorcc5682d2012-12-13 15:11:31 -080015func i(x int, y ...int, z float32) // ERROR "[.][.][.]"
Russ Coxd122bb22009-12-15 14:26:50 -080016
Russ Cox6672b402010-06-14 11:23:11 -070017var x ...int; // ERROR "[.][.][.]|syntax|type"
Russ Coxd122bb22009-12-15 14:26:50 -080018
Russ Cox6672b402010-06-14 11:23:11 -070019type T ...int; // ERROR "[.][.][.]|syntax|type"