From 443a13998dc3eccab26c27bee4fa056cdbc8f994 Mon Sep 17 00:00:00 2001 From: Joeri Exelmans Date: Tue, 13 May 2025 17:50:23 +0200 Subject: [PATCH] forgot 'new' --- lib/generics/generics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generics/generics.js b/lib/generics/generics.js index 63ce9e4..a722a1f 100644 --- a/lib/generics/generics.js +++ b/lib/generics/generics.js @@ -188,7 +188,7 @@ export const substitute = (type, substitutions, stack=[]) => { export const assignFn = (funType, paramType) => { if (getSymbol(funType) !== symbolFunction) { - throw NotAFunctionError(`${prettyT(funType)} is not a function type!`); + throw new NotAFunctionError(`${prettyT(funType)} is not a function type!`); } [funType, paramType] = recomputeTypeVars([funType, paramType]); // console.log(prettyT(funType), prettyT(paramType));