You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem. Thanks.
What steps will reproduce the problem?
1. Try to run an import list with semicolons and commas through cgo.
What is the expected output? What do you see instead?
Expected: Compiles. Actual: Syntax error.
What is your $GOOS? $GOARCH?
GOARCH=amd64
GOOS=linux
Which revision are you using? (hg identify)
e7f3b2a4d933 tip
Please provide any additional information below.
I have a module with
this import list:
import (
"db"; // generic database API
"fmt";
"http";
"os";
"reflect";
"strconv";
"unsafe";
)
After my update cgo now produces this import list in the cgo1.go file:
import (
"db";
"fmt" // generic database API
;
"http";
"os";
"reflect";
"strconv";
"unsafe";
)
Then the lone semicolon causes a syntax error. I can fix this by
removing the comment, but it's probably a cgo bug where the new syntax
rules for semicolons didn't get hacked in yet. :-D
The text was updated successfully, but these errors were encountered:
This is a gofmt bug; assigning to gri. Simple test case:
; cat x.go
package main
import (
"fmt"; //hello
"math";
)
; gofmt x.go
package main
import (
"fmt";
"math" //hello
;
)
by peter.hans.froehlich:
The text was updated successfully, but these errors were encountered: