blob: 6f5592ef0ebf3a4ef38ee0de60539e10ef352382 [file] [log] [blame]
Matthew Dempskyadda7ad2016-08-16 16:33:05 -07001// errorcheck
Russ Cox2a01d722010-01-26 23:13:22 -08002
Emmanuel Odeke53fd5222016-04-10 14:32:26 -07003// Copyright 2010 The Go Authors. All rights reserved.
Russ Cox2a01d722010-01-26 23:13:22 -08004// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
Matthew Dempsky70544c92016-06-06 17:59:05 -07007// TODO(mdempsky): Update error expectations for new parser.
8// The new parser emits an extra "missing { after for clause" error.
9// The old parser is supposed to emit this too, but it panics first
10// due to a nil pointer dereference.
11
Russ Cox2a01d722010-01-26 23:13:22 -080012package main
13
14func main() {
Ian Lance Taylordb3ec4f2010-02-04 21:31:30 -080015 for x // GCCGO_ERROR "undefined"
Robert Griesemerb569b872015-11-04 09:21:49 -080016 { // ERROR "missing .*{.* after for clause|missing operand"
Matthew Dempskyadda7ad2016-08-16 16:33:05 -070017 z // ERROR "undefined|missing { after for clause"