nac3artiq: throw error message when constructor use rpc decorator #306

Merged
sb10q merged 10 commits from issue-221 into master 2022-07-11 15:55:55 +08:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 5048977a6b - Show all commits

View File

@ -396,7 +396,7 @@ impl Nac3 {
if let StmtKind::FunctionDef { name, decorator_list, .. } = &stmt.node { if let StmtKind::FunctionDef { name, decorator_list, .. } = &stmt.node {
if let Some(location) = decorator_list if let Some(location) = decorator_list
.iter() .iter()
.find_map(|ast::Located { location, node, .. } | { .find_map(|ast::Located { location, node, .. }| {
match node { match node {
ExprKind::Name { id, .. } if id == &"rpc".into() => Some(location), ExprKind::Name { id, .. } if id == &"rpc".into() => Some(location),
_ => None, _ => None,