Skip to content

Commit

Permalink
Return error for unknown function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Glyphack committed Oct 9, 2023
1 parent 744b919 commit 947d591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typechecker/src/type_check/type_evaluator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl TypeEvaluator {
self.infer_type_from_symbol_table(n.id.as_str(), n.node.start)?;
match f_type {
PythonType::Callable(callable_type) => Ok(callable_type.return_type),
_ => Ok(PythonType::Unknown),
_ => Err(miette!("{} is not callable", n.id)),
}
}
ast::Expression::Attribute(_a) => Ok(PythonType::Unknown),
Expand Down

0 comments on commit 947d591

Please sign in to comment.