Fix bug where global names could only be used once in the root scope
Global names previously would only load once, and then not again because of issues with how the root scope is compiled. This is fixed. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -104,6 +104,10 @@ impl Compile {
|
||||
pub(crate) fn collect_locals(&mut self, body: &Body) {
|
||||
locals::CollectLocals::new(self).collect(body);
|
||||
}
|
||||
|
||||
pub(crate) fn scope(&self) -> &Scope {
|
||||
&self.scope
|
||||
}
|
||||
}
|
||||
|
||||
/// Constant data pool used for building the const pool.
|
||||
|
||||
Reference in New Issue
Block a user