diff --git a/src/semantic/index.ts b/src/semantic/index.ts index 9b78e20..cc7badf 100644 --- a/src/semantic/index.ts +++ b/src/semantic/index.ts @@ -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))