diff options
author | liljencrantz <liljencrantz@gmail.com> | 2008-01-09 13:01:36 +1000 |
---|---|---|
committer | liljencrantz <liljencrantz@gmail.com> | 2008-01-09 13:01:36 +1000 |
commit | 2229fad41025c32d6c79c9ce141c0ef4456fdae4 (patch) | |
tree | 35b2a7c383b6d2234f0f07489ebf8384e9cd9564 | |
parent | 8e9384e2e8be9b70b7489676b84983f303000ce0 (diff) |
Fix bug in return and block builtins - they where unable to handle functions that do not shadow the calling scope
darcs-hash:20080109030136-75c98-05f7a48cd991ac24e15d7e8b580caef0396ff59c.gz
-rw-r--r-- | builtin.c | 10 | ||||
-rw-r--r-- | doc_src/index.hdr.in | 1 |
2 files changed, 7 insertions, 4 deletions
@@ -866,7 +866,9 @@ static int builtin_block( wchar_t **argv ) } case UNSET: { - while( block && block->type != FUNCTION_CALL ) + while( block && + block->type != FUNCTION_CALL && + block->type != FUNCTION_CALL_NO_SHADOW ) block = block->outer; } } @@ -3458,7 +3460,8 @@ static int builtin_return( wchar_t **argv ) while( (b != 0) && - ( b->type != FUNCTION_CALL) ) + ( b->type != FUNCTION_CALL && + b->type != FUNCTION_CALL_NO_SHADOW) ) { b = b->outer; } @@ -3473,7 +3476,8 @@ static int builtin_return( wchar_t **argv ) } b = current_block; - while( ( b->type != FUNCTION_CALL)) + while( ( b->type != FUNCTION_CALL && + b->type != FUNCTION_CALL_NO_SHADOW ) ) { b->type = FAKE; b->skip=1; diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in index 4b502fb9..b02a6dde 100644 --- a/doc_src/index.hdr.in +++ b/doc_src/index.hdr.in @@ -1417,7 +1417,6 @@ g++, javac, java, gcj, lpr, doxygen, whois) - delete-word is broken on the commandline 'sudo update-alternatives --config x-' - Sometimes autoheader needs to be run on a fresh tarball. Fix dates before creating tarballs. - The completion autoloader does not remember which completions where actually autoloaded, and may unload manually specified completions. -- Calling return in functions with no scope shadowing triggers a bug If you think you have found a bug not described here, please send a report to <a href="mailto:fish-users@lists.sf.net">fish-users@lists.sf.net</a>. |