diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-13 18:39:26 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-13 18:39:26 -0400 |
commit | 2ea075dc4f48b5212a2b404e59ce16147871ba86 (patch) | |
tree | 52dc360b9afed97ac85774256bfa9f7dfe237590 /src/op.cc | |
parent | 7708ed1a750fb3dd79fad1562f0fec8a06422339 (diff) | |
download | fork-ledger-2ea075dc4f48b5212a2b404e59ce16147871ba86.tar.gz fork-ledger-2ea075dc4f48b5212a2b404e59ce16147871ba86.tar.bz2 fork-ledger-2ea075dc4f48b5212a2b404e59ce16147871ba86.zip |
Report error context in expressions more precisely
Diffstat (limited to 'src/op.cc')
-rw-r--r-- | src/op.cc | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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())); |