@@ -699,18 +699,16 @@ class Evaluator(
699699
700700 def visitBindings (
701701 bindings : Array [Bind ],
702- scope : ( Val . Obj , Val . Obj ) => ValScope ): Array [( Val . Obj , Val . Obj ) => Lazy ] = {
703- val arrF = new Array [( Val . Obj , Val . Obj ) => Lazy ](bindings.length)
702+ scope : => ValScope ): Array [Lazy ] = {
703+ val arrF = new Array [Lazy ](bindings.length)
704704 var i = 0
705705 while (i < bindings.length) {
706706 val b = bindings(i)
707707 arrF(i) = b.args match {
708708 case null =>
709- (self : Val .Obj , sup : Val .Obj ) =>
710- new LazyWithComputeFunc (() => visitExpr(b.rhs)(scope(self, sup)))
709+ new LazyWithComputeFunc (() => visitExpr(b.rhs)(scope))
711710 case argSpec =>
712- (self : Val .Obj , sup : Val .Obj ) =>
713- new LazyWithComputeFunc (() => visitMethod(b.rhs, argSpec, b.pos)(scope(self, sup)))
711+ new LazyWithComputeFunc (() => visitMethod(b.rhs, argSpec, b.pos)(scope))
714712 }
715713 i += 1
716714 }
@@ -851,7 +849,7 @@ class Evaluator(
851849 new Val .Obj .Member (e.plus, Visibility .Normal ) {
852850 def invoke (self : Val .Obj , sup : Val .Obj , fs : FileScope , ev : EvalScope ): Val = {
853851 lazy val newScope : ValScope = s.extend(newBindings, self, sup)
854- lazy val newBindings = visitBindings(binds, (self, sup) => newScope)
852+ lazy val newBindings = visitBindings(binds, newScope)
855853 visitExpr(e.value)(newScope)
856854 }
857855 }
0 commit comments