/**
  * Updates the <code>node</code> to which <b>(OBJECT-DEPTH)</b> was applied previously.
  *
  * @param context the minimal typing proof context.
  * @param pNode the node to update according to <b>(OBJECT-DEPTH)</b>.
  */
 public void updateObjectDepth(MinimalTypingProofContext context, MinimalTypingProofNode pNode) {
   MinimalTypingTypesProofNode node = (MinimalTypingTypesProofNode) pNode;
   ObjectType type = (ObjectType) node.getType();
   ObjectType type2 = (ObjectType) node.getType2();
   RowType r1 = (RowType) (type).getPhi();
   RowType r2 = (RowType) (type2).getPhi();
   Identifier[] ids1 = r1.getIdentifiers();
   MonoType[] types = r1.getTypes();
   MonoType[] types2 = r2.getTypes();
   if (node.isFinished() && node.getChildCount() < ids1.length) {
     int index = r2.getIndexOfIdentifier(ids1[node.getChildCount()]);
     if (index < 0)
       throw new RuntimeException(Messages.getString("SubTypingException.5")); // $NON-NLS-1$
     context.addProofNode(node, types[node.getChildCount()], types2[index]);
   }
 }