mirror of
https://github.com/golang/go
synced 2024-11-17 03:14:50 -07:00
a88cb1d8e1
Followup to CL 157961 and CL 158457. Finish the list of operators and punctuation that disable semicolon insertion at end-of-line The reported case was "(" but "." was also missing. Fixes #31017. Change-Id: I0c06443f38dc8250c62e3aadd104abfa0e3be074 Reviewed-on: https://go-review.googlesource.com/c/go/+/174524 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
29 lines
657 B
Go
29 lines
657 B
Go
// Copyright 2019 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Error with newline inserted into constant expression.
|
|
// Compilation test only, nothing to run.
|
|
|
|
package cgotest
|
|
|
|
// static void issue29781F(char **p, int n) {}
|
|
// #define ISSUE29781C 0
|
|
import "C"
|
|
|
|
var issue29781X struct{ X int }
|
|
|
|
func issue29781F(...int) int { return 0 }
|
|
|
|
func issue29781G() {
|
|
var p *C.char
|
|
C.issue29781F(&p, C.ISSUE29781C+1)
|
|
C.issue29781F(nil, (C.int)(
|
|
0))
|
|
C.issue29781F(&p, (C.int)(0))
|
|
C.issue29781F(&p, (C.int)(
|
|
0))
|
|
C.issue29781F(&p, (C.int)(issue29781X.
|
|
X))
|
|
}
|