Skip to content

Commit

Permalink
use "_field" as proto3 optional oneof name compatible with proto3 for #…
Browse files Browse the repository at this point in the history
  • Loading branch information
starwing committed Dec 6, 2023
1 parent 0db880c commit 3631ca6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protoc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ local function label_field(self, lex, ident, parent)
if proto3_optional then
local ot = default(parent, "oneof_decl")
info.oneof_index = #ot
ot[#ot+1] = { name = "optional_" .. info.name }
ot[#ot+1] = { name = "_" .. info.name }
else
info.label = label
end
Expand Down

0 comments on commit 3631ca6

Please sign in to comment.