From 9d587fdadfffb9c2d34a830c812dae393baacf67 Mon Sep 17 00:00:00 2001 From: mappu Date: Wed, 27 Nov 2024 18:12:40 +1300 Subject: [PATCH] genbindings/go: avoid name collisions between enums and enum entries --- cmd/genbindings/emitgo.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index 0c835ae5..b7e14801 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -688,6 +688,10 @@ import "C" preventShortNames[e.EnumName] = struct{}{} continue nextEnum } + if _, ok := KnownEnums[shortEnumName+"::"+ee.EntryName]; ok { + preventShortNames[e.EnumName] = struct{}{} + continue nextEnum + } } }