Skip to content

cmd/go2go: calling a generic function with the same type argument(s) in two different files generates duplicate code #39749

@firelizzard18

Description

@firelizzard18

What version of Go are you using (go version)?

$ go version
go version devel +0a030888da Sat Jun 20 04:46:40 2020 +0000 linux/amd64

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"

What did you do?

I ran go tool go2go build on https://gitlab.com/firelizzard/go-iter/-/tree/master/issues/i1

What did you expect to see?

A successful build

What did you see instead?

a.go2:9: instantiate୦୦A୦int redeclared in this block
        previous declaration at a.go2:9

Both b.go and c.go define func instantiate୦୦A୦int(m [](int), i int) { ... }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions