@Override
public PType caseAAssignmentDefinition(AAssignmentDefinition node,
TypeCheckInfo question) throws AnalysisException
{
question.qualifiers = null;
node.setType(question.assistantFactory.createPTypeAssistant().typeResolve(question.assistantFactory.createPDefinitionAssistant().getType(node), null, THIS, question));
ExcludedDefinitions.setExcluded(node);
node.setExpType(node.getExpression().apply(THIS, question));
ExcludedDefinitions.clearExcluded();
question.assistantFactory.getTypeComparator().checkComposeTypes(node.getType(), question.env, false);
if (node.getExpType() instanceof AVoidType)
{
TypeCheckerErrors.report(3048, "Expression does not return a value", node.getExpression().getLocation(), node.getExpression());
}
if (!question.assistantFactory.getTypeComparator().compatible(node.getType(), node.getExpType()))
{
TypeCheckerErrors.report(3000, "Expression does not match declared type", node.getExpression().getLocation(), node);
TypeCheckerErrors.detail2("Declared", node.getType(), "Expression", node.getExpType());
}
return node.getType();
}