Skip to content

Commit

Permalink
Add TODO for better return type errors
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Rift <anna.rift@hpe.com>
  • Loading branch information
riftEmber committed Oct 29, 2024
1 parent 3f2302a commit 3845cf9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/lib/resolution/return-type-inference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ QualifiedType ReturnTypeInferrer::returnedType() {
(QualifiedType::Kind) returnIntent);
if (!retType) {
// Couldn't find common type, so return type is incorrect.
// TODO: replace with custom error class, and give more information about
// why we couldn't determine a return type
context->error(fnAstForErr, "could not determine return type for function");
retType = QualifiedType(QualifiedType::UNKNOWN, ErroneousType::get(context));
}
Expand Down

0 comments on commit 3845cf9

Please sign in to comment.