diff options
| author | Russ Cox <rsc@golang.org> | 2010-08-03 00:53:32 -0700 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-08-03 00:53:32 -0700 |
| commit | c6cb303a8a5d8751bf32d5c3d3974eff514d67a2 (patch) | |
| tree | ea5442eed2c5522b5435adb7d77ae3147bc0348a /test/bugs | |
| parent | b91c70ad52c638453ef97ef46223d53353a3ed8e (diff) | |
| download | go-c6cb303a8a5d8751bf32d5c3d3974eff514d67a2.tar.xz | |
gc: bug299, bug300
R=ken2
CC=golang-dev
https://golang.org/cl/1731057
Diffstat (limited to 'test/bugs')
| -rw-r--r-- | test/bugs/bug299.go | 27 | ||||
| -rw-r--r-- | test/bugs/bug300.go | 29 |
2 files changed, 0 insertions, 56 deletions
diff --git a/test/bugs/bug299.go b/test/bugs/bug299.go deleted file mode 100644 index d455540c65..0000000000 --- a/test/bugs/bug299.go +++ /dev/null @@ -1,27 +0,0 @@ -// errchk $G $D/$F.go - -// Copyright 2010 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 - -type T struct { - // accepted by both compilers, legal according to spec - x int - y (int) - int - *float - // not accepted by both compilers, not legal according to spec - (complex) // ERROR "non-declaration|expected" - (*string) // ERROR "non-declaration|expected" - *(bool) // ERROR "non-declaration|expected" -} - -// accepted by both compilers, legal according to spec -func (p T) m() {} - -// accepted by 6g, not accepted by gccgo, not legal according to spec -func (p (T)) f() {} // ERROR "expected" -func (p *(T)) g() {} // ERROR "expected" -func (p (*T)) h() {} // ERROR "expected" diff --git a/test/bugs/bug300.go b/test/bugs/bug300.go deleted file mode 100644 index dbed509391..0000000000 --- a/test/bugs/bug300.go +++ /dev/null @@ -1,29 +0,0 @@ -// errchk $G $D/$F.go - -// Copyright 2010 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 - -type T struct { - x, y *T -} - -func main() { - // legal composite literals - _ = struct{}{} - _ = [42]int{} - _ = [...]int{} - _ = []int{} - _ = map[int]int{} - _ = T{} - - // illegal composite literals: parentheses not allowed around literal type - _ = (struct{}){} // ERROR "xxx" - _ = ([42]int){} // ERROR "xxx" - _ = ([...]int){} // ERROR "xxx" - _ = ([]int){} // ERROR "xxx" - _ = (map[int]int){} // ERROR "xxx" - _ = (T){} // ERROR "xxx" -} |
