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