@Override public Value caseASameClassExp(ASameClassExp node, Context ctxt) throws AnalysisException { BreakpointManager.getBreakpoint(node).check(node.getLocation(), ctxt); try { Value l = node.getLeft().apply(VdmRuntime.getExpressionEvaluator(), ctxt); Value r = node.getRight().apply(VdmRuntime.getExpressionEvaluator(), ctxt); if (!l.isType(ObjectValue.class) || !r.isType(ObjectValue.class)) { return new BooleanValue(false); } ObjectValue lv = l.objectValue(ctxt); ObjectValue rv = r.objectValue(ctxt); return new BooleanValue(lv.type.equals(rv.type)); } catch (ValueException e) { return VdmRuntimeError.abort(node.getLocation(), e); } }