diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/defs.bzl | 1 | ||||
-rw-r--r-- | tools/go_generics/globals/scope.go | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tools/defs.bzl b/tools/defs.bzl index 41eded16d..0bd468786 100644 --- a/tools/defs.bzl +++ b/tools/defs.bzl @@ -96,6 +96,7 @@ def go_imports(name, src, out): cmd = ("$(location @org_golang_x_tools//cmd/goimports:goimports) $(SRCS) > $@"), ) +# TODO(b/158696872): Enable nogo by default. def go_library(name, srcs, deps = [], imports = [], stateify = True, marshal = False, marshal_debug = False, nogo = False, **kwargs): """Wraps the standard go_library and does stateification and marshalling. diff --git a/tools/go_generics/globals/scope.go b/tools/go_generics/globals/scope.go index 96c965ea2..eec93534b 100644 --- a/tools/go_generics/globals/scope.go +++ b/tools/go_generics/globals/scope.go @@ -72,6 +72,10 @@ func (s *scope) deepLookup(n string) *symbol { } func (s *scope) add(name string, kind SymKind, pos token.Pos) { + if s.syms[name] != nil { + return + } + s.syms[name] = &symbol{ kind: kind, pos: pos, |