From c6cb303a8a5d8751bf32d5c3d3974eff514d67a2 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 3 Aug 2010 00:53:32 -0700 Subject: gc: bug299, bug300 R=ken2 CC=golang-dev https://golang.org/cl/1731057 --- test/bugs/bug299.go | 27 --------------------------- test/bugs/bug300.go | 29 ----------------------------- 2 files changed, 56 deletions(-) delete mode 100644 test/bugs/bug299.go delete mode 100644 test/bugs/bug300.go (limited to 'test/bugs') 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" -} -- cgit v1.3-5-g9baa