Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix[lang]: allow type expressions inside pure functions #3906

Merged

Commits on Apr 2, 2024

  1. fix[lang]: allow type expressions inside pure functions

    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 rule so that
    ast traversal does not progress into type expressions.
    charles-cooper committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    84ca3cf View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2024

  1. Configuration menu
    Copy the full SHA
    39c3981 View commit details
    Browse the repository at this point in the history