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

Improve type checker #488

Open
krl opened this issue Aug 22, 2024 · 2 comments
Open

Improve type checker #488

krl opened this issue Aug 22, 2024 · 2 comments

Comments

@krl
Copy link
Collaborator

krl commented Aug 22, 2024

The typechecker as is, is not correct enough to reliably produce correct webassembly and will need to be improved.

Various workarounds involving explicitly overriding types in typemaps, as is the case in the current codebase, only get us that far.

@aldur
Copy link
Collaborator

aldur commented Sep 18, 2024

This needs discussing plus additional scoping.

@csgui
Copy link
Collaborator

csgui commented Oct 22, 2024

Adding this to start collecting detailed improvements and fixes needed on the typechecker side:

1 - The inconsistency in function arguments should have been caught by the typechecker. Example below should not pass once the typechecker is fixed and can correctly detect all argument inconsistencies.

crosscheck(
    "(get-block-info? burnchain-header-hash u0 u0)",
    Err(Error::Unchecked(CheckErrors::IncorrectArgumentCount(2, 3))),
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Status: 🆕 New
Development

No branches or pull requests

4 participants