We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9c2803 commit b73f3d6Copy full SHA for b73f3d6
compiler/src/symboltable.rs
@@ -710,7 +710,8 @@ impl SymbolTableBuilder {
710
let location = Default::default();
711
712
// Some checks:
713
- if table.symbols.contains_key(name) {
+ let containing = table.symbols.contains_key(name);
714
+ if containing {
715
// Role already set..
716
match role {
717
SymbolUsage::Global => {
@@ -747,7 +748,7 @@ impl SymbolTableBuilder {
747
748
}
749
750
// Insert symbol when required:
- if !table.symbols.contains_key(name) {
751
+ if !containing {
752
let symbol = Symbol::new(name);
753
table.symbols.insert(name.to_string(), symbol);
754
0 commit comments