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

Interpreter error message not clear #1131

Open
samuelmanzanera opened this issue Jun 29, 2023 · 0 comments
Open

Interpreter error message not clear #1131

samuelmanzanera opened this issue Jun 29, 2023 · 0 comments
Labels
bug Something isn't working smart contracts Involve smart contracts

Comments

@samuelmanzanera
Copy link
Member

samuelmanzanera commented Jun 29, 2023

Describe the problem you discovered

If we pass a smart contract code with just the following code:

@version 1

We get an error which is not accurate:

unexpected term - @:atom => \"version\"(1) - L1

This issue seems to related to a pattern matching issue

https://github.com/archethic-foundation/archethic-node/blob/31cc63def92a24b74a5133f3c8f19a7d3e9a7886/lib/archethic/contracts/interpreter.ex#L36C10-L38C44

Describe the solution you'd like

The interpreter should accept @Version 1 without having a block or mention the contract cannot be empty with only the version mention.

Epic

#608

@samuelmanzanera samuelmanzanera added bug Something isn't working smart contracts Involve smart contracts labels Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working smart contracts Involve smart contracts
Projects
None yet
Development

No branches or pull requests

1 participant