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

Clear symbol table before running unit tests for analyzer #944

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

taichi-ishitani
Copy link
Contributor

@taichi-ishitani taichi-ishitani commented Sep 6, 2024

Some unit tests for analyzer are not executed correctly because there are cases that an error which has been reported will be reported again.
To avoid this problem, symbol table should be cleared before running a test case.

let code = r#"
module ModuleC {
always_comb {
var a: logic;
a = 1;
}
}
"#;
let errors = analyze(code);
assert!(matches!(errors[0], AnalyzerError::UnusedVariable { .. }));

This test case is not executed correctly due to this change so will be removed for now.
#940 is to discuss how to handle this kind of code.

@dalance dalance merged commit a4f914f into veryl-lang:master Sep 6, 2024
7 checks passed
@taichi-ishitani taichi-ishitani deleted the clear_symbol_table branch September 6, 2024 04:50
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.

2 participants