diff options
author | Russ Cox <rsc@golang.org> | 2010-09-24 11:55:30 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-09-24 11:55:30 -0400 |
commit | ae57636feb9528a094e23a8b4bde17b418a94b00 (patch) | |
tree | bec1185284c993e02bfe099940dd4d7a95356faf /test/ddd1.go | |
parent | 712e31e8d44b0da7650cb25957e63b02298e56e5 (diff) | |
download | go-ae57636feb9528a094e23a8b4bde17b418a94b00.tar.gz |
gc: ... changes
R=ken2, ken3
CC=golang-dev
http://codereview.appspot.com/2208047
Diffstat (limited to 'test/ddd1.go')
-rw-r--r-- | test/ddd1.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/ddd1.go b/test/ddd1.go index 6f714c078..fcd32c282 100644 --- a/test/ddd1.go +++ b/test/ddd1.go @@ -6,6 +6,8 @@ package main +import "unsafe" + func sum(args ...int) int { return 0 } var ( @@ -26,3 +28,20 @@ var ( _ = funny(nil, nil) _ = funny([]T{}) // ok because []T{} is a T; passes []T{[]T{}} ) + +func bad(args ...int) { + print(1, 2, args...) // ERROR "[.][.][.]" + println(args...) // ERROR "[.][.][.]" + ch := make(chan int) + close(ch...) // ERROR "[.][.][.]" + _ = len(args...) // ERROR "[.][.][.]" + _ = closed(ch...) // ERROR "[.][.][.]" + _ = new(int...) // ERROR "[.][.][.]" + n := 10 + _ = make([]byte, n...) // ERROR "[.][.][.]" + // TODO(rsc): enable after gofmt bug is fixed + // _ = make([]byte, 10 ...) // error "[.][.][.]" + var x int + _ = unsafe.Pointer(&x...) // ERROR "[.][.][.]" + _ = unsafe.Sizeof(x...) // ERROR "[.][.][.]" +} |