Skip to content

[Go] Improper escaping of tables named "var" #7141

@jameskuszmaul-brt

Description

@jameskuszmaul-brt

See, e.g., https://github.com/google/flatbuffers/runs/5382947641?check_suite_focus=true where I had a table named var and am getting:

# MyGame/Example
go_gen/src/MyGame/Example/var.go:20:12: syntax error: unexpected var, expecting type
go_gen/src/MyGame/Example/var.go:24:12: syntax error: unexpected var, expecting type
go_gen/src/MyGame/Example/var.go:31:6: syntax error: unexpected var, expecting name
go_gen/src/MyGame/Example/var.go:3[5](https://github.com/google/flatbuffers/runs/5382947641?check_suite_focus=true#step:4:5):[6](https://github.com/google/flatbuffers/runs/5382947641?check_suite_focus=true#step:4:6)1: syntax error: unexpected var, expecting type
go_gen/src/MyGame/Example/var.go:36:41: syntax error: unexpected : after top level declaration
go_gen/src/MyGame/Example/var.go:3[7](https://github.com/google/flatbuffers/runs/5382947641?check_suite_focus=true#step:4:7):11: syntax error: unexpected {, expecting name
go_gen/src/MyGame/Example/var.go:42:73: syntax error: unexpected var, expecting type
go_gen/src/MyGame/Example/var.go:43:64: syntax error: unexpected : after top level declaration
go_gen/src/MyGame/Example/var.go:44:11: syntax error: unexpected {, expecting name
go_gen/src/MyGame/Example/var.go:4[9](https://github.com/google/flatbuffers/runs/5382947641?check_suite_focus=true#step:4:9):[12](https://github.com/google/flatbuffers/runs/5382947641?check_suite_focus=true#step:4:12): syntax error: unexpected var, expecting type
go_gen/src/MyGame/Example/var.go:49:12: too many errors
FAIL	flatbuffers_test [build failed]
FAIL
KO: Go tests failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions