docs: protected void mergeTypeDeclarations(TypeDeclaration oldDeclaration,
                                         TypeDeclaration newDeclaration) {
          if (oldDeclaration == null) {
              return;
          }
  
          //add the missing fields (if any) to newDeclaration
          for (FieldDefinition oldFactField : oldDeclaration.getTypeClassDef().getFieldsDefinitions()) {
              FieldDefinition newFactField = newDeclaration.getTypeClassDef().getField(oldFactField.getName());
              if (newFactField == null) {
                  newDeclaration.getTypeClassDef().addField(oldFactField);
              }
          }
  
          //copy the defined class
          newDeclaration.setTypeClass( oldDeclaration.getTypeClass() );
      }