Skip to content

Commit

Permalink
Fix lexical scope id calculation on creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
tritao committed Aug 4, 2024
1 parent 85e6a73 commit e16d996
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sway-core/src/semantic_analysis/namespace/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ impl Module {
parent: Some(previous_scope_id),
..Default::default()
});
self.current_lexical_scope_id()
self.lexical_scopes.len() - 1
};
let previous_scope = self.lexical_scopes.get_mut(previous_scope_id).unwrap();
previous_scope.children.push(new_scoped_id);
Expand Down

0 comments on commit e16d996

Please sign in to comment.