Skip to content

Commit

Permalink
Fix bad "unused variable" error for var used in latency annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
VonTum committed Jan 28, 2025
1 parent a2a580c commit d7f1d1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/flattening/lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ fn make_fanins(instructions: &FlatAlloc<Instruction, FlatIDMarker>) -> FlatAlloc
}
}
Instruction::Declaration(decl) => {
if let Some(lat_spec) = decl.latency_specifier {
collector_func(lat_spec);
}
decl.typ_expr.for_each_generative_input(&mut collector_func);
}
Instruction::Expression(wire) => {
Expand Down
7 changes: 0 additions & 7 deletions test.sus_errors.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
Warning: Unused Variable: This variable does not affect the output ports of this module
╭─[util.sus:72:34]
72 │ module JoinDomains #(T1, T2, int OFFSET) {
│ ───┬──
│ ╰──── Unused Variable: This variable does not affect the output ports of this module
────╯
Error: 'contains_submodule_submodule' conflicts with other declarations:
╭─[test.sus:441:8]
Expand Down

0 comments on commit d7f1d1c

Please sign in to comment.