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
See https://golang.org/cl/118690044/#msg3
$ cat -n issue7757.go
1 // Copyright 2014 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 package main
6
7 /*
8 void foo() {}
9 */
10 import "C"
11
12 func main() {
13 C.foo = C.foo // ERROR HERE
14 }
$ go tool cgo issue7757.go
$ cat _obj/issue7757.cgo1.go
// Created by cgo - DO NOT EDIT
//line /usr/local/google/home/mdempsky/wd/go2/misc/cgo/errors/issue7757.go:5
package main
//line /usr/local/google/home/mdempsky/wd/go2/misc/cgo/errors/issue7757.go:13
//line /usr/local/google/home/mdempsky/wd/go2/misc/cgo/errors/issue7757.go:12
func main() {
//line /usr/local/google/home/mdempsky/wd/go2/misc/cgo/errors/issue7757.go:12
_Cgo_ptr(_Cfpvar_fp_foo) = _Cgo_ptr(_Cfpvar_fp_foo)
//line /usr/local/google/home/mdempsky/wd/go2/misc/cgo/errors/issue7757.go:14
}
Because of the "//line" output, the go compiler thinks the illegal assignment
error is on line 12, when it actually came from line 13.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: