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

Unclear AnalysisError #33

Closed
friedger opened this issue Jun 2, 2021 · 1 comment
Closed

Unclear AnalysisError #33

friedger opened this issue Jun 2, 2021 · 1 comment

Comments

@friedger
Copy link
Contributor

friedger commented Jun 2, 2021

I don't understand the error. Is the actual value correct?

Expected: (tuple (hashbytes (buff 20)) (version (buff 1)))

Found : (tuple (hashbytes int) (version int))

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ("Analysis error: expecting expression of type \'(tuple (hashbytes (buff 20)) (version (buff 1)))\', found \'(tuple (hashbytes int) (version int))\'", Some(Diagnostic { level: Error, message: "expecting expression of type \'(tuple (hashbytes (buff 20)) (version (buff 1)))\', found \'(tuple (hashbytes int) (version int))\'", spans: [Span { start_line: 1, start_column: 182, end_line: 1, end_column: 215 }], suggestion: None }))', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/clarinet-0.9.3/src/test/deno.rs:436:66
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
@friedger
Copy link
Contributor Author

friedger commented Jun 4, 2021

The message is created when calling a function with a parameter like

 types.tuple({version: 0x01, hashbytes: 0x12345678901234567890}),

instead of

 types.tuple({version: "0x01", hashbytes: "0x12345678901234567890"}),

@friedger friedger closed this as completed Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant