Skip to content

Commit 01c4c3c

Browse files
committed
Prevent duplicate setup of the global scope.
1 parent c51c29a commit 01c4c3c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

transform.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,10 @@ def rewrite_yield(exps)
604604
end
605605

606606
def setup_global_scope(exp)
607-
@global_scope = GlobalScope.new(@vtableoffsets)
608-
build_class_scopes(exp,@global_scope)
607+
if !@global_scope
608+
@global_scope = GlobalScope.new(@vtableoffsets)
609+
build_class_scopes(exp,@global_scope)
610+
end
609611
end
610612

611613
def preprocess exp

0 commit comments

Comments
 (0)