diff options
author | Teddy <ted.sybil@gmail.com> | 2013-08-07 00:56:37 +0800 |
---|---|---|
committer | Teddy <ted.sybil@gmail.com> | 2013-08-07 00:56:37 +0800 |
commit | cecd643ab2de3e4dbd69e76c58b928ab2aa2a80f (patch) | |
tree | 773d94e7a4309b32d61ee724b8dfd82e2e460221 /eval.cpp | |
parent | dd6394d93dc21305e26232891daf5b19c226dd3a (diff) |
list checking fix
Diffstat (limited to 'eval.cpp')
-rw-r--r-- | eval.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -71,6 +71,8 @@ void push(Cons * &pc, FrameObj ** &top_ptr, Environment *envt) { throw NormalError(SYN_ERR_EMPTY_COMB); *top_ptr++ = new RetAddr(pc); // Push the return address + if (!is_list(TO_CONS(pc->car))) + throw TokenError(pc->car->ext_repr(), RUN_ERR_WRONG_NUM_OF_ARGS); // static_cast because of is_simple_obj() is false pc = static_cast<Cons*>(pc->car); // Go deeper to enter the call } |