-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve errors for substituted for variables (#495)
Improve errors for substituted for variables This improves the error reporting for substituted index variables. For example, when the index variable is actually out-of-range then its nice to report a sensible error about this.
- Loading branch information
1 parent
3aed5d4
commit 2bae347
Showing
4 changed files
with
59 additions
and
2 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
;;error:10:36-37:array index out-of-bounds | ||
;;error:10:31-38:void expression not permitted here | ||
(defcolumns | ||
(BIT :binary@prove :array [4]) | ||
(ARG :i16@loob)) | ||
|
||
(defconstraint bits () | ||
(- ARG | ||
(reduce + | ||
(for i [0:3] (* (^ 2 i) [BIT i]))))) |