@@ -699,18 +699,16 @@ class Evaluator(
699
699
700
700
def visitBindings (
701
701
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)
704
704
var i = 0
705
705
while (i < bindings.length) {
706
706
val b = bindings(i)
707
707
arrF(i) = b.args match {
708
708
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))
711
710
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))
714
712
}
715
713
i += 1
716
714
}
@@ -851,7 +849,7 @@ class Evaluator(
851
849
new Val .Obj .Member (e.plus, Visibility .Normal ) {
852
850
def invoke (self : Val .Obj , sup : Val .Obj , fs : FileScope , ev : EvalScope ): Val = {
853
851
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)
855
853
visitExpr(e.value)(newScope)
856
854
}
857
855
}
0 commit comments