diff options
Diffstat (limited to 'test/ddd1.go')
-rw-r--r-- | test/ddd1.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ddd1.go b/test/ddd1.go index 1e070093c..07981af12 100644 --- a/test/ddd1.go +++ b/test/ddd1.go @@ -22,6 +22,16 @@ var ( _ = sum([]int{1}) // ERROR "\[\]int literal.*as type int|incompatible" ) +func sum3(int, int, int) int { return 0 } +func tuple() (int, int, int) { return 1, 2, 3 } + +var ( + _ = sum(tuple()) + _ = sum(tuple()...) // ERROR "multiple-value|[.][.][.]" + _ = sum3(tuple()) + _ = sum3(tuple()...) // ERROR "multiple-value|[.][.][.]" "not enough" +) + type T []T func funny(args ...T) int { return 0 } |