diff options
-rw-r--r-- | scripts/function_def.bash | 7 | ||||
-rw-r--r-- | src/core/interpreter.cpp | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/scripts/function_def.bash b/scripts/function_def.bash index 8b7bd50..609d8b4 100644 --- a/scripts/function_def.bash +++ b/scripts/function_def.bash @@ -87,3 +87,10 @@ if false; then } fi function_in_compound_statement + +function shift_test() { + shift + echo $1 +} + +shift_test 1 2 diff --git a/src/core/interpreter.cpp b/src/core/interpreter.cpp index a92bea3..b048353 100644 --- a/src/core/interpreter.cpp +++ b/src/core/interpreter.cpp @@ -309,7 +309,7 @@ void interpreter::define_function_arguments(scope& current_stack, for(auto i = 1u; i <= arguments.size(); ++i) positional_args[i] = arguments[i - 1]; - current_stack["*"].reset(new variable("*", positional_args, true)); + current_stack["*"].reset(new variable("*", positional_args)); } namespace |