-
-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat[lang]: export interfaces (#3919)
this commit allows exporting of `module.<interface>`, and also adds `module.__interface__` which gives the interface type of the module. in particular, this makes it easier for users to export all functions from a module, since they do not need to list out every single function manually. note that since `module.__interface__` is actually an interface type, it can theoretically be used in type expressions, e.g., ```vyper x: module.__interface__ = module.__interface__(msg.sender) ``` however, it doesn't work yet as some additional work is required to properly thread the type into the type analysis system (see related: GH #3943). this commit includes the restriction that only `implement`ed interfaces can be exported, this makes the most sense from a UX / user intuition perspective. --------- Co-authored-by: cyberthirst <cyberthirst.eth@gmail.com>
- Loading branch information
1 parent
cb94068
commit 6f09e29
Showing
4 changed files
with
498 additions
and
24 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
Oops, something went wrong.