diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-02-17 07:56:29 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-02-17 07:56:29 -0800 |
commit | e45772713089105c776556655d671102375d9a72 (patch) | |
tree | b6201f694dac62b8375c087a97ccf437847dce52 /match.c | |
parent | cf5fbe748a05001e840d3efcdba15e8d56369ccb (diff) | |
download | txr-e45772713089105c776556655d671102375d9a72.tar.gz txr-e45772713089105c776556655d671102375d9a72.tar.bz2 txr-e45772713089105c776556655d671102375d9a72.zip |
@(call): bugfix: matching doesn't continue.
* match.c (v_call): This function must propagate the
next_spec_k return value, rather than return a
short-circuiting match object, which causes the parent
to immediately succeed.
* tests/008/call.txr: New test case, from Frank Schwidom.
* tests/008/call.expected: Likewise.
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4516,7 +4516,8 @@ static val v_call(match_files_ctx *c) if (ret == decline_k) sem_error(nil, lit("call: function ~s not found"), funval, nao); - return cons(ctx.bindings, if3(ctx.data, cons(ctx.data, ctx.data_lineno), t)); + c->bindings = ctx.bindings; + return ret; } static val h_do(match_line_ctx *c) |