-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[oil-language] Turn off bare assignment (parse_equals) by default
This addresses #937, which was also noted by a user. Bare assignment like 'x = 42' was equivalent to 'const x = 42'. However this causes inconsistency in programs. We only want bare assignment for config dialects like: server www.example.com { root = '/' port = 8080 } On the other hand we don't want proc p { const x = 42 y = 43 # inconsistent } Also add a failing test for bare assignment in blocks. This is another issue -- some blocks will introduce a new scope, and some won't. So we don't want the static check for 'const already defined in scope'. Instead bare assignment will only do DYNAMIC checks (similar to the top level), and 'const' will do STATIC checks.
- Loading branch information
Andy C
committed
Apr 30, 2022
1 parent
10fefce
commit 9fe9583
Showing
8 changed files
with
54 additions
and
12 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
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