Matthew Dempsky | adda7ad | 2016-08-16 16:33:05 -0700 | [diff] [blame] | 1 | // errorcheck |
Russ Cox | 2a01d72 | 2010-01-26 23:13:22 -0800 | [diff] [blame] | 2 | |
Emmanuel Odeke | 53fd522 | 2016-04-10 14:32:26 -0700 | [diff] [blame] | 3 | // Copyright 2010 The Go Authors. All rights reserved. |
Russ Cox | 2a01d72 | 2010-01-26 23:13:22 -0800 | [diff] [blame] | 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file. |
| 6 | |
Matthew Dempsky | 70544c9 | 2016-06-06 17:59:05 -0700 | [diff] [blame] | 7 | // 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 Cox | 2a01d72 | 2010-01-26 23:13:22 -0800 | [diff] [blame] | 12 | package main |
| 13 | |
| 14 | func main() { |
Ian Lance Taylor | db3ec4f | 2010-02-04 21:31:30 -0800 | [diff] [blame] | 15 | for x // GCCGO_ERROR "undefined" |
Robert Griesemer | b569b87 | 2015-11-04 09:21:49 -0800 | [diff] [blame] | 16 | { // ERROR "missing .*{.* after for clause|missing operand" |
Matthew Dempsky | adda7ad | 2016-08-16 16:33:05 -0700 | [diff] [blame] | 17 | z // ERROR "undefined|missing { after for clause" |