From e3a1041031a0ea64869ffbcf8e1759adb19d4e6c Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 25 Aug 2024 15:32:08 +1200 Subject: [PATCH] genbindings: block use of binding-reserved word 'ret' --- cmd/genbindings/emitgo.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index 0b0ec702..14e61165 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -10,7 +10,8 @@ import ( func goReservedWord(s string) bool { switch s { - case "default", "const", "func", "var", "type", "len", "new", "copy", "import", "range", "string", "map", "int", "select": + case "default", "const", "func", "var", "type", "len", "new", "copy", "import", "range", "string", "map", "int", "select", + "ret": // not a language-reserved word, but a binding-reserved word return true default: return false