-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #458 from HigherOrderCO/top-level-names-with-doubl…
…e-slash Dont allow top level names start with '//'
- Loading branch information
Showing
6 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
8 changes: 8 additions & 0 deletions
8
tests/golden_tests/compile_file/top_level_name_slashslash.bend
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,8 @@ | ||
def random//constant(): | ||
return 3.14 | ||
|
||
def //thisshouldfail(): | ||
return random//constant() | ||
|
||
def main: | ||
return //thisshouldfail() |
8 changes: 8 additions & 0 deletions
8
tests/snapshots/compile_file__top_level_name_slashslash.bend.snap
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,8 @@ | ||
--- | ||
source: tests/golden_tests.rs | ||
input_file: tests/golden_tests/compile_file/top_level_name_slashslash.bend | ||
--- | ||
[4m[1m[31mErrors:[0m | ||
In tests/golden_tests/compile_file/top_level_name_slashslash.bend : | ||
Top-level names are not allowed to start with "//". | ||
[0m 4 | def [4m[31m//thisshouldfail[0m():[0m |