-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added Fact check for Head/Tail (#451)
Added a fact check for Head/Tail array functions, which improves a bit the feedback. ``` let foo : Int[] = []; let bar = Head(foo); ``` current error: `ERROR: runtime error: index out of range: 0` new error: `ERROR: runtime error: program failed: Array must have at least 1 element` ``` let foo : Int[] = []; let bar = Tail(foo); ``` current error: `ERROR: runtime error: value cannot be used as an index: -1` new error: `ERROR: runtime error: program failed: Array must have at least 1 element` --- Regarding for the trailing whitespace changes - VS Code cleaned it up "on its own" due to `"editor.formatOnType": true` setting - but I kept them because they seem anyway to be consistent with the rest of the codebase. Co-authored-by: DmitryVasilevsky <60718360+DmitryVasilevsky@users.noreply.github.com>
- Loading branch information
1 parent
c1f579f
commit 19fb576
Showing
1 changed file
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters