Skip to content

Commit b7c5b3f

Browse files
committed
fix: store if the definitions are global
1 parent f35960f commit b7c5b3f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/modules/variable/init.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ impl SyntaxModule<ParserMetadata> for VariableInit {
100100
self.handle_add_variable(meta, &mut def)?;
101101
}
102102

103+
self.is_global_ctx = definitions.iter().any(|x| x.global_id.is_some());
103104
self.is_fun_ctx = meta.context.is_fun_ctx;
104105
self.definitions = definitions.clone();
105106
Ok(())

0 commit comments

Comments
 (0)