private void verifyTypeConsistency(DocumentType superType) {
        for (Field f : getAllUniqueFields()) {
            Field supField = superType.getField(f.getName());
            if (supField != null) {
                if (!f.getDataType().equals(supField.getDataType())) {
                    throw new IllegalArgumentException("Inheritance type mismatch: field \"" + f.getName() +
                                                       "\" in datatype \"" + getName() + "\"" +
                                                       " must have same datatype as in parent document type \"" + superType.getName() + "\"");
                }
            }
        }
    }
Fail if the subtype changes the type of any equally named field.

@param superType The supertype to verify against
                 TODO Add strict type checking no duplicate fields are allowed
document/src/main/java/com/yahoo/document/DocumentType.java