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] mutable bool in conditional branch causes must resolve to a boolean #583

Closed
0rphon opened this issue Jan 28, 2021 · 1 comment · Fixed by #601
Closed

[Bug] mutable bool in conditional branch causes must resolve to a boolean #583

0rphon opened this issue Jan 28, 2021 · 1 comment · Fixed by #601
Labels
bug Something isn't working

Comments

@0rphon
Copy link
Contributor

0rphon commented Jan 28, 2021

🐛 Bug Report

Code snippet to reproduce

function main () {
    let mut x = true;
    if x {
        let y = 0u8;
    }
}

Stack trace & error message

 Compiling Starting...
 Compiling Compiling main program... ("d:\\Work\\leo_playground\\src/main.leo")
 Compiling     --> "d:\\Work\\leo_playground\\src/main.leo": 3:5
     |
   3 |      if x {
     |  ^^^^
     |
     = If, else conditional must resolve to a boolean, found `true`

Your Environment

  • leo's latest master commit ed395a0
  • rustc 1.49.0 (e1884a8e3 2020-12-29)
  • windows 10 build 10.0.19042.746
@0rphon 0rphon added the bug Something isn't working label Jan 28, 2021
@0rphon
Copy link
Contributor Author

0rphon commented Feb 3, 2021

not fixed by asg ( 2657c44)

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
None yet
Development

Successfully merging a pull request may close this issue.

1 participant