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

New type checker #1017

Open
dalance opened this issue Oct 17, 2024 · 0 comments · May be fixed by #1216
Open

New type checker #1017

dalance opened this issue Oct 17, 2024 · 0 comments · May be fixed by #1216
Labels
tools Tools feature

Comments

@dalance
Copy link
Collaborator

dalance commented Oct 17, 2024

After merging #1016, type checking based on invalid_factor causes to miss some type errors like:

struct A {
}

let a: logic = A;

Before #1016, Factor didn't contain type, so invalid_factor error was occurred.
After #1016, Factor can contain type, and type check is passed.

Therefore another type checking scheme is necessary.
I think the following way:

  • Introduce type evaluation to Evaluator of Expression
  • Check type equivalency around assignment, port connection, function call, and so on.

By introducing this way, invalid_factor and some scattered type checking logics can be removed, and some additional checks can be achieved like type or width mismatch at assignment.

Related: #1012 #76

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

Successfully merging a pull request may close this issue.

1 participant