New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imported types cannot be used in call position #3943
Comments
charles-cooper
added a commit
that referenced
this issue
Apr 14, 2024
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>
electriclilies
pushed a commit
to electriclilies/vyper
that referenced
this issue
Apr 27, 2024
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 vyperlang#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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version Information
vyper --version
): cb94068What's your issue about?
the following doesn't compile:
fails with something like the following:
The text was updated successfully, but these errors were encountered: