summaryrefslogtreecommitdiff
path: root/test/bugs
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-08-03 00:53:32 -0700
committerRuss Cox <rsc@golang.org>2010-08-03 00:53:32 -0700
commit6323c64b4a55a4a7ab6ebd5b89d224492cae6c02 (patch)
treeee979fb94cc291b1a48200e62e670c4323bc611e /test/bugs
parent827ff69a99500c6f6b254708ee72f8bfd0225591 (diff)
downloadgo-6323c64b4a55a4a7ab6ebd5b89d224492cae6c02.tar.gz
gc: bug299, bug300
R=ken2 CC=golang-dev http://codereview.appspot.com/1731057
Diffstat (limited to 'test/bugs')
-rw-r--r--test/bugs/bug299.go27
-rw-r--r--test/bugs/bug300.go29
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"
-}