-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/fix: rewrite list addition and multiplication
Arithmetic on lists hasn't been part of the spec since 2021. We want to remove support for it. Teach `cue fix` to detect and rewrite: - list addition, which becomes a call to `list.Concat` - list multiplication, which becomes a call to `list.Repeat` These fixes are not perfect because `cue fix` has no access to type information and so only cases where there is a literal list can be fixed. Fixes #2237. Signed-off-by: Matthew Sackman <matthew@cue.works> Change-Id: I99946833277cda5de8004a30d5e4f909cfcc1016
- Loading branch information
1 parent
a4ebf4d
commit 540f282
Showing
2 changed files
with
98 additions
and
100 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