Skip to content

Go: Conflicts between identifiers #1703

Description

@QuantumSegfault

While trying to compile Go bindings generated by wit-bindgen 0.61.1 for https://github.com/Pumpkin-MC/pumpkin-plugin-wit, I've run into issues with symbol conflicts. I've noticed two major categories:


    variant my-variant {
         tag
    }

A variant with member tag will generate a getter Tag conflicting with the internal Tag (discriminator) of the variant itself.


  record my-variant-item {
    // ...
  }
  variant my-variant {
    item(my-variant-item),
  }

Having a record XY conflicts with the enum member produced for the tag for a variant X with case Y.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    gen-goRelated to the Go code generator

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions