@Override public PType caseAExists1Exp(AExists1Exp node,
TypeCheckInfo question) throws AnalysisException
{
node.setDef(AstFactory.newAMultiBindListDefinition(node.getBind().getLocation(), question.assistantFactory.createPBindAssistant().getMultipleBindList(node.getBind())));
node.getDef().apply(THIS, question.newConstraint(null));
Environment local = new FlatCheckedEnvironment(question.assistantFactory, node.getDef(), question.env, question.scope);
if (node.getBind() instanceof ATypeBind)
{
ATypeBind tb = (ATypeBind) node.getBind();
question.assistantFactory.createATypeBindAssistant().typeResolve(tb, THIS, question);
}
question.qualifiers = null;
if (!question.assistantFactory.createPTypeAssistant().isType(node.getPredicate().apply(THIS, new TypeCheckInfo(question.assistantFactory, local, question.scope, null, AstFactory.newABooleanBasicType(node.getLocation()), null)), ABooleanBasicType.class))
{
TypeCheckerErrors.report(3088, "Predicate is not boolean", node.getPredicate().getLocation(), node.getPredicate());
}
local.unusedCheck();
node.setType(AstFactory.newABooleanBasicType(node.getLocation()));
return question.assistantFactory.createPTypeAssistant().checkConstraint(question.constraint, node.getType(), node.getLocation());
}