2016-06-06 18:59:05 -06:00
|
|
|
// errorcheck -newparser=0
|
2010-01-27 00:13:22 -07:00
|
|
|
|
2016-04-10 15:32:26 -06:00
|
|
|
// Copyright 2010 The Go Authors. All rights reserved.
|
2010-01-27 00:13:22 -07:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2016-06-06 18:59:05 -06:00
|
|
|
// TODO(mdempsky): Update error expectations for new parser.
|
|
|
|
// The new parser emits an extra "missing { after for clause" error.
|
|
|
|
// The old parser is supposed to emit this too, but it panics first
|
|
|
|
// due to a nil pointer dereference.
|
|
|
|
|
2010-01-27 00:13:22 -07:00
|
|
|
package main
|
|
|
|
|
|
|
|
func main() {
|
2010-02-04 22:31:30 -07:00
|
|
|
for x // GCCGO_ERROR "undefined"
|
2015-11-04 10:21:49 -07:00
|
|
|
{ // ERROR "missing .*{.* after for clause|missing operand"
|
2010-02-04 22:31:30 -07:00
|
|
|
z // GCCGO_ERROR "undefined"
|