diff options
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 d455540c6..000000000 --- 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 dbed50939..000000000 --- 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" -} |