Skip to content

Commit

Permalink
feat: add index if name is not zero
Browse files Browse the repository at this point in the history
  • Loading branch information
siyul-park committed Nov 26, 2023
1 parent fc22c38 commit 1b2ef00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/symbol/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ func (t *Table) Close() error {

func (t *Table) insert(sym *Symbol) error {
t.symbols[sym.ID()] = sym
t.index[sym.Namespace()] = lo.Assign(t.index[sym.Namespace()], map[string]ulid.ULID{sym.Name(): sym.ID()})

if sym.Name() != "" {
t.index[sym.Namespace()] = lo.Assign(t.index[sym.Namespace()], map[string]ulid.ULID{sym.Name(): sym.ID()})
}

Check warning on line 120 in pkg/symbol/table.go

View check run for this annotation

Codecov / codecov/patch

pkg/symbol/table.go#L119-L120

Added lines #L119 - L120 were not covered by tests

unlinks := map[string][]scheme.PortLocation{}

Expand Down

0 comments on commit 1b2ef00

Please sign in to comment.