cmd/cgo: exported function name shadowing issue #44974
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, this was introduced somewhere between 1.14 and 1.16.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Attempting to compile the following snippet fails in 1.16:
The generated C code fails to compile, because of the overloaded
foo
name (variable shadowing the type):With 1.14, the generated code doesn't use the name from the go code, and so doesn't have this issue:
What did you expect to see?
No build failure.
What did you see instead?
Build failure.
The text was updated successfully, but these errors were encountered: