Skip to content
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

bug : manual lint panic when match expression is a function #124

Open
chachaleo opened this issue Sep 27, 2024 · 0 comments
Open

bug : manual lint panic when match expression is a function #124

chachaleo opened this issue Sep 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@chachaleo
Copy link
Contributor

Manual lint fails when the expression in the ExprMatch is a function

Example :

#[derive(Copy, Drop)]
enum Error {
    Error,
}
fn main() {
    let self: u256 = 0; 
    let _self_result: Result<u8, Error> = match self.try_into() {
        Option::Some(value) => Result::Ok(value),
        Option::None => Result::Err(Error::Error)
    };
}

panics with Expected a variable or path in match expression, because self.try_into() is a function and the lint does not support it currently in the fix function

@mkaput mkaput added this to cairo-lint Dec 9, 2024
@github-project-automation github-project-automation bot moved this to Triage in cairo-lint Dec 9, 2024
@mkaput mkaput moved this from Triage to Backlog in cairo-lint Dec 11, 2024
@mkaput mkaput added the bug Something isn't working label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants