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

fixed multiple issues with expression checking #786

Merged
merged 8 commits into from
Jun 17, 2024

Conversation

nblei
Copy link
Contributor

@nblei nblei commented Jun 12, 2024

Fixes the issue raised by @nananapo in #785 but also fixes a number of other related issues.

  1. Modports and interfaces were allowed to be in expressions if they were passed in to a module as a port. This has been fixed.
  2. While user defined functions are not higher ordered type operators, some SystemVerilog System Functions are --- namely, ones which extract size information from a type. Thus, Enum, Union, Struct, UnionMember, and StructMember are suitable to be passed into functions with Kind SystemFunction.

));
self.errors.push(error);
} else {
self.call_stack_kind.push(FunctionKind::NonSystem);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think self.call_stack_kind.pop corresponding to this push may be required at HandlerPoint::After.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're correct.

self.call_stack_kind.pop();
}
SymbolKind::SystemFunction => {
self.call_stack_kind.push(FunctionKind::System);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this push not pop?

@nblei
Copy link
Contributor Author

nblei commented Jun 14, 2024 via email

@dalance
Copy link
Collaborator

dalance commented Jun 14, 2024

Thanks.
I'll merge this PR after resolving the conflict.

@dalance dalance merged commit e27e0c5 into veryl-lang:master Jun 17, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants