mirror of
https://github.com/golang/go
synced 2024-11-17 02:24:42 -07:00
a63ff398d5
Only complain about missing type; leave it to type-checking to decide whether "..." is permitted in the first place. Fixes #43674. Change-Id: Icbc8f084e364fe3ac16076406a134354219c08d0 Reviewed-on: https://go-review.googlesource.com/c/go/+/310209 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
20 lines
471 B
Go
20 lines
471 B
Go
// errorcheck
|
|
|
|
// 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
|
|
|
|
func f(x int, y ...int) // ok
|
|
|
|
func g(x int, y float32) (...) // ERROR "[.][.][.]"
|
|
|
|
func h(x, y ...int) // ERROR "[.][.][.]"
|
|
|
|
func i(x int, y ...int, z float32) // ERROR "[.][.][.]"
|
|
|
|
var x ...int; // ERROR "[.][.][.]|syntax|type"
|
|
|
|
type T ...int; // ERROR "[.][.][.]|syntax|type"
|