if(compilationContext.errorLog.getErrorCount() != errorCountBeforeTypeChecking) {
int typeArity = Types.getArity(type);
if(typeArity != functionArity)
- compilationContext.errorLog.log(value.definitionLocation, "Possible problem: type declaration has " + typeArity + " parameter types, but function definition has " + functionArity + " parameters.");
+ compilationContext.errorLog.logWarning(value.definitionLocation, "Possible problem: type declaration has " + typeArity + " parameter types, but function definition has " + functionArity + " parameters.");
}
ArrayList<EVariable> demands = context.getConstraintDemand();
compilationContext.errorLog.log(c.getDemandLocation(),
"Constraint <"+c.constraint+"> is not given and cannot be derived.");
}
- if(compilationContext.errorLog.isEmpty()) { // To prevent exceptions
+ if(compilationContext.errorLog.hasNoErrors()) { // To prevent exceptions
expression = ExpressionAugmentation.augmentSolved(
red.solvedConstraints,
expression);
}
}
else {
- if(compilationContext.errorLog.isEmpty()) // To prevent exceptions
+ if(compilationContext.errorLog.hasNoErrors()) // To prevent exceptions
expression = expression.decomposeMatching();
}
expression = expression.closure(vars.toArray(new TVar[vars.size()]));