aboutsummaryrefslogtreecommitdiff
path: root/test/syntax
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2016-08-16 16:33:05 -0700
committerMatthew Dempsky <mdempsky@google.com>2016-10-25 22:28:40 +0000
commitadda7ad29551d0880df1805ae22401551b1fbfa8 (patch)
tree0cf1e773a78132a9d8ff266cf5863887321549b4 /test/syntax
parent263a825b0534a55916d472ba17feff7d1ed47569 (diff)
downloadgo-adda7ad29551d0880df1805ae22401551b1fbfa8.tar.gz
go-adda7ad29551d0880df1805ae22401551b1fbfa8.zip
cmd/compile/internal/gc: enable new parser by default
Change-Id: I3c784986755cfbbe1b8eb8da4d64227bd109a3b0 Reviewed-on: https://go-review.googlesource.com/27203 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'test/syntax')
-rw-r--r--test/syntax/chan1.go10
-rw-r--r--test/syntax/semi4.go4
2 files changed, 5 insertions, 9 deletions
diff --git a/test/syntax/chan1.go b/test/syntax/chan1.go
index 22724fd297..a33a0d4cea 100644
--- a/test/syntax/chan1.go
+++ b/test/syntax/chan1.go
@@ -1,21 +1,17 @@
-// errorcheck -newparser=0
+// errorcheck
// 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.
-// TODO(mdempsky): Update for new parser or delete.
-// Like go/parser, the new parser doesn't specially recognize
-// send statements misused in an expression context.
-
package main
var c chan int
var v int
func main() {
- if c <- v { // ERROR "used as value"
+ if c <- v { // ERROR "used as value|missing condition|invalid condition"
}
}
-var _ = c <- v // ERROR "used as value"
+var _ = c <- v // ERROR "used as value|unexpected <-"
diff --git a/test/syntax/semi4.go b/test/syntax/semi4.go
index 262926a01e..6f5592ef0e 100644
--- a/test/syntax/semi4.go
+++ b/test/syntax/semi4.go
@@ -1,4 +1,4 @@
-// errorcheck -newparser=0
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -14,4 +14,4 @@ package main
func main() {
for x // GCCGO_ERROR "undefined"
{ // ERROR "missing .*{.* after for clause|missing operand"
- z // GCCGO_ERROR "undefined"
+ z // ERROR "undefined|missing { after for clause"