From 15237b34dbce5ea54973a178449e67cca8ac4f9d Mon Sep 17 00:00:00 2001 From: Koby Hall <102518238+kobyhallx@users.noreply.github.com> Date: Tue, 16 Jan 2024 15:48:45 +0100 Subject: [PATCH] feat(lsp): goto global (#4043) # Description ## Problem\* Resolves feat(lsp): goto global definition #3728 ## Summary\* Allows user to go to global definition. ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[Exceptional Case]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --- compiler/noirc_frontend/src/resolve_locations.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/noirc_frontend/src/resolve_locations.rs b/compiler/noirc_frontend/src/resolve_locations.rs index bfacee0ef96..95ced906984 100644 --- a/compiler/noirc_frontend/src/resolve_locations.rs +++ b/compiler/noirc_frontend/src/resolve_locations.rs @@ -75,6 +75,7 @@ impl NodeInterner { Some(self.function_meta(&func_id).location) } DefinitionKind::Local(_local_id) => Some(definition_info.location), + DefinitionKind::Global(_global_id) => Some(definition_info.location), _ => None, } }