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] same implicit value for different types causes mismatch error #575

Closed
0rphon opened this issue Jan 26, 2021 · 1 comment
Closed

[Bug] same implicit value for different types causes mismatch error #575

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

using the same implicit value for different types causes leo to throw an error

Code snippet to reproduce

function main () {
    let x: u8 = 2;
    let z: u16 = 2;
}

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": 2:5
     |
   2 |      let x: u8 = 2;
     |      ^^^^^^^^^^^^^^
     |
     = Mismatched types. Expected type `u8`, found type `u16`.

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