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

Lazy Initialization of IR Types causes a bug in Type::fromKind #79

Open
emmanuel099 opened this issue Sep 21, 2018 · 0 comments
Open

Lazy Initialization of IR Types causes a bug in Type::fromKind #79

emmanuel099 opened this issue Sep 21, 2018 · 0 comments
Assignees

Comments

@emmanuel099
Copy link

Describe the bug

Type inference has a problem when the type has not be used in the specification, but the type kind is used for the inference.

To Reproduce

Executing the following example gives an unable to infer type, @4{1eee} error for undef. But this example should be resolvable, because we expect a bool and thus the inference can use this fact to resolve the type of undef.

CASM init foo

rule foo =
    if undef then
        skip

Expected behavior

Type the undef as boolean and give an error during execution.

Additional context

The IR Type::fromKind returns an empty list because the lazy initialization is not performed.

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

No branches or pull requests

2 participants