if (this.definition != null)
this.definitionType = this.definition.typecheck(env, Optional.ofNullable(resolved));
if (resolved == null)
resolved = definitionType;
binding = new NameBindingImpl(binding.getName(), resolved);
if (binding.getType() == null) {
this.binding = new NameBindingImpl(binding.getName(), resolved);
} else if (this.definitionType != null && !this.definitionType.subtype(resolved)){
ToolError.reportError(ErrorMessage.NOT_SUBTYPE, this, this.definitionType.toString(), binding.getType().toString());
}
return binding.getType();