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

Closed
opened 2022-07-02 13:37:46 +00: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 13:37:50 +00:00
AlexBethel was assigned by Ghost 2022-07-02 13:37:57 +00:00
Ghost referenced this issue from a commit 2022-09-14 19:46:30 +00:00
Ghost closed this issue 2022-09-14 19:46:56 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
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
There is no content yet.