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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] using implicit value from ternary causes conditional select Unsatisfiable #574

Closed
0rphon opened this issue Jan 26, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@0rphon
Copy link
Contributor

0rphon commented Jan 26, 2021

馃悰 Bug Report

Code snippet to reproduce

function main () {
    let x: u8 = if true? 1u8 : 2; //works fine
    let z: bool = (if true? 1u8 : 2) == 3u8; //fails
}

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:20
     |
   3 |      let z: bool = (if true? 1u8 : 2) == 3u8; //fails
     |                     ^^^^^^^^^^^^^^^^
     |
     = the gadget operation `conditional select` failed due to synthesis error `Unsatisfiable`

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 26, 2021
@0rphon
Copy link
Contributor Author

0rphon commented Feb 3, 2021

fixed by asg (2657c44)

@0rphon 0rphon closed this as completed Feb 3, 2021
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

No branches or pull requests

1 participant