-
-
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.
fix[lang]: allow type expressions inside pure functions (#3906)
20432c5 introduced a regression where type expressions like the following would raise a compiler error instead of successfully compiling: ``` @pure def f(): convert(..., uint256) # raises `not a variable or literal: 'uint256'` ``` the reason is because `get_expr_info` is called on `uint256`, which is not a regular expr. this commit introduces a fastpath return to address the issue. longer-term, we should generalize the rules in `vyper/semantics/analysis/local.py` so that AST traversal does not progress into type expressions.
- Loading branch information
1 parent
9db9078
commit 45a225c
Showing
2 changed files
with
19 additions
and
3 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