Skip to content

Commit

Permalink
Semantic: redundant error
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanjermakov committed Apr 22, 2024
1 parent 709573e commit a297fda
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/semantic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,6 @@ const checkFnDef = (fnDef: FnDef, ctx: Context): void => {
}
upcast(rs, rs.type!, returnTypeResolved, ctx)
})
if (!isAssignable(fnDef.block.type!, returnTypeResolved, ctx)) {
addError(ctx, typeError(ctx, fnDef.returnType ?? fnDef.block, fnDef.block.type!, returnTypeResolved))
}
} else {
if (!instScope) {
addWarning(ctx, noBodyFnError(ctx, fnDef))
Expand Down

0 comments on commit a297fda

Please sign in to comment.