ignore expressions in class definition body (#26)

escape-analysis
Sebastien Bourdeauducq 2021-11-02 23:30:12 +08:00
parent 47f563908a
commit e89bc93b5f
1 changed files with 1 additions and 0 deletions

View File

@ -1396,6 +1396,7 @@ impl TopLevelComposer {
}
}
ast::StmtKind::Pass => {}
ast::StmtKind::Expr { value: _ } => {} // typically a docstring; ignoring all expressions matches CPython behavior
_ => return Err("unsupported statement type in class definition body".into()),
}
}