github.com/freddyisaac/sicortex-golang@v0.0.0-20231019035217-e03519e66f60/test/syntax/semi4.go (about)

     1  // errorcheck
     2  
     3  // Copyright 2010 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     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  
    12  package main
    13  
    14  func main() {
    15  	for x		// GCCGO_ERROR "undefined"
    16  	{		// ERROR "missing .*{.* after for clause|missing operand"
    17  		z	// ERROR "undefined|missing { after for clause"