Calling by-arity chained function panics when slicing in ExecEnv::deinterlace when providing less arguments #12

Closed
opened 2022-07-02 08:37:46 -05:00 by Ghost · 0 comments

Explanation

When calling functions chained by arity and argument list is not long enough to fulfill the arities of the functions in the chain, the interpreter panics when slicing the arguments.

Example code

functio Test (arg) 
{ arg print; }

Test * Test (AMOGUS);

Current behaviour

thread 'main' panicked at 'range start index 2 out of range for slice of length 1', library/core/src/slice/index.rs:52:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected behaviour

Call the second function in a chain with no arguments provided:

ඞ
undefined
# Explanation When calling functions chained by arity and argument list is not long enough to fulfill the arities of the functions in the chain, the interpreter panics when slicing the arguments. # Example code ``` functio Test (arg) { arg print; } Test * Test (AMOGUS); ``` # Current behaviour ``` thread 'main' panicked at 'range start index 2 out of range for slice of length 1', library/core/src/slice/index.rs:52:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` # Expected behaviour Call the second function in a chain with no arguments provided: ``` ඞ undefined ```
Ghost added the
bug
panic
labels 2022-07-02 08:37:50 -05:00
AlexBethel was assigned by Ghost 2022-07-02 08:37:57 -05:00
Ghost referenced this issue from a commit 2022-09-14 14:46:30 -05:00
Ghost closed this issue 2022-09-14 14:46:56 -05:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: AbleScript/ablescript#12
No description provided.