This may happen, if the variable is defined in a pattern and
the pattern type checking is not finished because of a type error.
Change-Id: I91aa4c7938769f84388fbc18f089b662e3ddcb9d
variable.setType(Types.metaVar(Kinds.STAR));
return this;
}
- else
+ else {
+ if(variable.getType() == null) {
+ context.getErrorLog().log(location, "Type of the variable is not defined.");
+ variable.setType(Types.metaVar(Kinds.STAR));
+ }
return applyPUnit(context);
+ }
}
@Override
variable.setType(requiredType);
return this;
}
- else
+ else {
+ if(variable.getType() == null) {
+ context.getErrorLog().log(location, "Type of the variable is not defined.");
+ variable.setType(Types.metaVar(Kinds.STAR));
+ }
return context.subsume(this, requiredType);
+ }
}
@Override