-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: stricter definition of
const
parameters (#776)
### Summary of Changes The definition of `const` parameters is now more strict: * Previously, any value that could be fully evaluated by the partial evaluator could be assigned to a constant parameter. * Now, a whitelist of expressions is allowed, including * boolean/float/int/null/string literals, * list literals (where the elements are constant), * map literals (where keys and values are constant), * enum variants (where arguments are constant). This allows such parameters to be handled fully in the sidebar of the graphical view. It also makes it possible to show errors/warnings at the exact places they occur, like when checking whether an `AnnotationTarget` appears multiple times.
- Loading branch information
1 parent
0a02850
commit 73a0d4e
Showing
18 changed files
with
544 additions
and
262 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
18 changes: 12 additions & 6 deletions
18
packages/safe-ds-lang/src/language/validation/other/expressions/calls.ts
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
Oops, something went wrong.