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));