Skip to content

Commit 43cde4d

Browse files
committed
add assertions
1 parent dc7d7bc commit 43cde4d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/ir/src/validate.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,17 +362,17 @@ impl<'a> Validate<'a> {
362362

363363
/// A prop is valid iff all of its fields are valid
364364
fn prop(&self, pidx: ir::PropIdx) {
365-
pidx.valid(self.comp);
365+
assert!(pidx.valid(self.comp));
366366
}
367367

368368
/// An expr is valid iff all of its arguments are valid
369369
fn expr(&self, eidx: ir::ExprIdx) {
370-
eidx.valid(self.comp);
370+
assert!(eidx.valid(self.comp));
371371
}
372372

373373
/// A time is valid iff all of its arguments are valid
374374
fn time(&self, tidx: ir::TimeIdx) {
375-
tidx.valid(self.comp);
375+
assert!(tidx.valid(self.comp));
376376
}
377377

378378
fn timesub(&self, ts: &ir::TimeSub) {

0 commit comments

Comments
 (0)