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

Cycle check #383

Merged
merged 12 commits into from
Sep 16, 2023
Merged

Cycle check #383

merged 12 commits into from
Sep 16, 2023

Conversation

nblei
Copy link
Contributor

@nblei nblei commented Sep 6, 2023

This adds type checking for cyclic dependencies:

image

These dependencies are checked for type aliases, structs and unions.

This is done with CreateTypeDag handler in Pass2. It runs in Pass2 because it requires the symbol table made in Pass1.

Follow on work will be to add further type checking on type sizes. This will go into Pass3, as it requires the [TypeDag] generated in Pass2.

@nblei
Copy link
Contributor Author

nblei commented Sep 9, 2023

Now also checks for undefined types:

image

Also, the Type DAG now stores sufficient information to create precise AnalyzerErrors when traversing the DAG, rather than while traversing the AST.

@dalance
Copy link
Collaborator

dalance commented Sep 15, 2023

Looks good!

There are some commented-out functions.
Can I merge them as is?

@nblei
Copy link
Contributor Author

nblei commented Sep 15, 2023

I pushed a commit removing those commented out functions.

@dalance
Copy link
Collaborator

dalance commented Sep 16, 2023

Thanks.
I'll merge this PR.

@dalance dalance merged commit 2afa65f into veryl-lang:master Sep 16, 2023
@dalance dalance added the enhancement New feature or request label Sep 16, 2023
@nblei nblei deleted the cycle_check branch June 5, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants