Skip to content

Go: Argument names can conflict with keywords and builtin identifiers #1678

Description

@QuantumSegfault

In the generated Go bindings, argument names (which are lowerCamelCased) are never checked to make sure they won't conflict with Go keywords and builtin types.

resource command-node {
    argument: static func(name: string, %type: argument-type) -> command-node;
}

becomes

func CommandNodeArgument(name string, type ArgumentType) *CommandNode {

Where type here is a Go keyword, which creates various compile errors.

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