github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/compile/internal/syntax/testdata/issue31092.src (about)

     1  // Copyright 2018 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Test cases for issue 31092: Better synchronization of
     6  // parser after seeing an := rather than an = in a const,
     7  // type, or variable declaration.
     8  
     9  package p
    10  
    11  const _ /* ERROR unexpected := */ := 0
    12  type _ /* ERROR unexpected := */ := int
    13  var _ /* ERROR unexpected := */ := 0
    14  
    15  const _ int /* ERROR unexpected := */ := 0
    16  var _ int /* ERROR unexpected := */ := 0