mirror of
https://github.com/Mercantec-GHC/h4-projekt-gruppe-0-sm.git
synced 2025-04-27 16:24:07 +02:00
compiler: remember call arg
This commit is contained in:
parent
2fe829a84f
commit
cea1a5f5bd
@ -218,7 +218,10 @@ export class Checker {
|
||||
const _args = kind.args.map((arg, i) =>
|
||||
this.checkExpr(arg, paramTys[i])
|
||||
);
|
||||
return fnTy.kind.returnTy;
|
||||
|
||||
const ty = fnTy.kind.returnTy;
|
||||
this.exprTys.set(expr.id, ty);
|
||||
return ty;
|
||||
}
|
||||
|
||||
private tyTy(ty: ast.Ty): Ty {
|
||||
|
@ -54,9 +54,8 @@ export function prettyPrintReport(ctx: Ctx, rep: Report) {
|
||||
const { severity, msg } = rep;
|
||||
const origin = rep.origin ? `\x1b[1m${rep.origin}:\x1b[0m ` : "";
|
||||
console.error(
|
||||
`${origin}${
|
||||
severityColor(severity)
|
||||
}${severity}:\x1b[0m \x1b[37m${msg}\x1b[0m`,
|
||||
`${origin}${severityColor(severity)}${severity}:\x1b[0m %c${msg}`,
|
||||
"color: white; font-weight: bold;",
|
||||
);
|
||||
if (!rep.file) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user