2016-06-06 17:59:05 -07:00
|
|
|
// errorcheck -newparser=0
|
2010-01-26 23:13:22 -08:00
|
|
|
|
2016-04-10 14:32:26 -07:00
|
|
|
// Copyright 2010 The Go Authors. All rights reserved.
|
2010-01-26 23:13:22 -08:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2016-06-06 17:59:05 -07: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-26 23:13:22 -08:00
|
|
|
package main
|
|
|
|
|
|
|
|
func main() {
|
2010-02-04 21:31:30 -08:00
|
|
|
for x // GCCGO_ERROR "undefined"
|
2015-11-04 09:21:49 -08:00
|
|
|
{ // ERROR "missing .*{.* after for clause|missing operand"
|
2010-02-04 21:31:30 -08:00
|
|
|
z // GCCGO_ERROR "undefined"
|