summaryrefslogtreecommitdiff
path: root/src/op.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-14 17:14:56 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-14 17:14:56 -0400
commitf3bedb88b24ae8b2047ad86e57b161265c2812f5 (patch)
treee6e5954f40a09e7fd002f242523c1eb0f318b397 /src/op.cc
parent0c699e4d57fe91fa04c4c2f23f9c2f2a6a5da582 (diff)
parent63b4bdaecff5a865bff22e8e7914bef6ab46fa6b (diff)
downloadfork-ledger-f3bedb88b24ae8b2047ad86e57b161265c2812f5.tar.gz
fork-ledger-f3bedb88b24ae8b2047ad86e57b161265c2812f5.tar.bz2
fork-ledger-f3bedb88b24ae8b2047ad86e57b161265c2812f5.zip
Merge branch 'next'
Diffstat (limited to 'src/op.cc')
-rw-r--r--src/op.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/op.cc b/src/op.cc
index c2001ec3..d7588b66 100644
--- a/src/op.cc
+++ b/src/op.cc
@@ -157,7 +157,7 @@ value_t expr_t::op_t::calc(scope_t& scope, ptr_op_t * locus, const int depth)
// Evaluating an identifier is the same as calling its definition
// directly, so we create an empty call_scope_t to reflect the scope for
// this implicit call.
- call_scope_t call_args(scope, scope.type_context(), scope.type_required());
+ call_scope_t call_args(scope, locus, depth);
result = left()->compile(call_args, depth + 1)
->calc(call_args, locus, depth + 1);
check_type_context(scope, result);
@@ -168,7 +168,7 @@ value_t expr_t::op_t::calc(scope_t& scope, ptr_op_t * locus, const int depth)
// Evaluating a FUNCTION is the same as calling it directly; this happens
// when certain functions-that-look-like-variables (such as "amount") are
// resolved.
- call_scope_t call_args(scope, scope.type_context(), scope.type_required());
+ call_scope_t call_args(scope, locus, depth);
result = as_function()(call_args);
check_type_context(scope, result);
#if defined(DEBUG_ON)
@@ -235,7 +235,7 @@ value_t expr_t::op_t::calc(scope_t& scope, ptr_op_t * locus, const int depth)
}
case O_CALL: {
- call_scope_t call_args(scope, scope.type_context(), scope.type_required());
+ call_scope_t call_args(scope, locus, depth);
if (has_right())
call_args.set_args(split_cons_expr(right()->kind == O_SEQ ?
right()->left() : right()));