-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some issues with how modules and overloads interact
Overloads are always defined in the global scope (so they can be overloaded from anywhere) Getting the overload members now only returns those in scope There is a custom error message when we try to use an overload, and none of it's members are in scope
- Loading branch information
Showing
6 changed files
with
72 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[93mType error[0m: | ||
[96mfail/overload_bound.sail[0m:2.4-7: | ||
2[96m |[0mval foo : unit -> unit | ||
[92m |[0m [92m^-^[0m [92mPrevious binding[0m | ||
[96mfail/overload_bound.sail[0m:4.0-20: | ||
4[96m |[0moverload foo = {foo} | ||
[91m |[0m[91m^------------------^[0m | ||
[91m |[0m foo cannot be defined as an overload, as it is already bound |
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,4 @@ | ||
|
||
val foo : unit -> unit | ||
|
||
overload foo = {foo} |