nac3core: type inferencer fix the pass statement
This commit is contained in:
parent
df6c9c8a35
commit
1c170f5c41
@ -939,7 +939,7 @@ fn test_analyze(source: Vec<&str>, res: Vec<&str>) {
|
||||
indoc! {"
|
||||
class A:
|
||||
def fun(self):
|
||||
1 + 2
|
||||
pass
|
||||
"},
|
||||
indoc!{"
|
||||
class B:
|
||||
|
@ -128,7 +128,7 @@ impl<'a> fold::Fold<()> for Inferencer<'a> {
|
||||
}
|
||||
}
|
||||
ast::StmtKind::AnnAssign { .. } | ast::StmtKind::Expr { .. } => {}
|
||||
ast::StmtKind::Break | ast::StmtKind::Continue => {}
|
||||
ast::StmtKind::Break | ast::StmtKind::Continue | ast::StmtKind::Pass => {}
|
||||
ast::StmtKind::Return { value } => match (value, self.function_data.return_type) {
|
||||
(Some(v), Some(v1)) => {
|
||||
self.unify(v.custom.unwrap(), v1, &v.location)?;
|
||||
|
Loading…
Reference in New Issue
Block a user