nac3core: add missing expr concrete type check
This commit is contained in:
parent
7bc63e2892
commit
4a63ba42a2
|
@ -24,11 +24,13 @@ impl<'a> Inferencer<'a> {
|
||||||
if !defined_identifiers.contains(id) {
|
if !defined_identifiers.contains(id) {
|
||||||
defined_identifiers.insert(*id);
|
defined_identifiers.insert(*id);
|
||||||
}
|
}
|
||||||
|
self.check_expr(pattern, defined_identifiers)?;
|
||||||
self.should_have_value(pattern)?;
|
self.should_have_value(pattern)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
ExprKind::Tuple { elts, .. } => {
|
ExprKind::Tuple { elts, .. } => {
|
||||||
for elt in elts.iter() {
|
for elt in elts.iter() {
|
||||||
|
self.check_expr(pattern, defined_identifiers)?;
|
||||||
self.check_pattern(elt, defined_identifiers)?;
|
self.check_pattern(elt, defined_identifiers)?;
|
||||||
self.should_have_value(elt)?;
|
self.should_have_value(elt)?;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue