@Override public PType caseAIsOfClassExp(AIsOfClassExp node, TypeCheckInfo question) throws AnalysisException { ILexNameToken classname = node.getClassName(); PDefinition cls = question.env.findType(classname, null); if (cls == null || !(cls instanceof SClassDefinition)) { TypeCheckerErrors.report(3115, "Undefined class type: " + classname.getName(), node.getLocation(), node); } else { node.setClassType((AClassType) cls.getType()); } question.qualifiers = null; PType rt = node.getExp().apply(THIS, question.newConstraint(null)); if (!question.assistantFactory.createPTypeAssistant().isClass(rt, question.env)) { TypeCheckerErrors.report(3266, "Argument is not an object", node.getExp().getLocation(), node.getExp()); } node.setType(AstFactory.newABooleanBasicType(node.getLocation())); return question.assistantFactory.createPTypeAssistant().checkConstraint(question.constraint, node.getType(), node.getLocation()); }