src/utils/miscUtilities.js
// a subclass cannot inherit from a superclass that has the subclass as an object member or as a superclass, or has the subclass in one of the object members or their superclasses
a subclass cannot inherit from a superclass that has the subclass as an object member or as a superclass, or has the subclass in one of the object members or their superclasses
a subclass cannot inherit from a superclass that has the subclass as an object member or as a superclass or has the subclass in one of the object members or their superclasses
function checkInfiniteLoopErr(JSONFile, subClassName, superClassName) {
  let allSuperClasses = getAllSuperClassesInDefn(JSONFile, superClassName);
  let allObjs = getAllObjInDefn(JSONFile, superClassName);
  let combinedObjsSuperClasses = allSuperClasses.concat(allObjs);
  let checkBoth = [];
  let retArr = [];
  for (let i in combinedObjsSuperClasses) {
    checkBoth = checkBoth.concat(
      getAllSuperClassesInDefn(JSONFile, combinedObjsSuperClasses[i])
    );
    checkBoth = checkBoth.concat(
      getAllObjInDefn(JSONFile, combinedObjsSuperClasses[i])
    );
  }
  checkBoth = checkBoth.concat(combinedObjsSuperClasses);
  retArr = [...new Set(checkBoth)];
  return retArr.includes(subClassName);
}
function checkInfiniteLoopErr ( JSONFile , subClassName , superClassName ) { let allSuperClasses = getAllSuperClassesInDefn ( JSONFile , superClassName ) ; let allObjs = getAllObjInDefn ( JSONFile , superClassName ) ; let combinedObjsSuperClasses = allSuperClasses . concat ( allObjs ) ; let checkBoth = [ ] ; let retArr = [ ] ; for ( let i in combinedObjsSuperClasses ) { checkBoth = checkBoth . concat ( getAllSuperClassesInDefn ( JSONFile , combinedObjsSuperClasses [ i ] ) ) ; checkBoth = checkBoth . concat ( getAllObjInDefn ( JSONFile , combinedObjsSuperClasses [ i ] ) ) ; } checkBoth = checkBoth . concat ( combinedObjsSuperClasses ) ; retArr = [ ... new Set ( checkBoth ) ] ; return retArr . includes ( subClassName ) ; }
a subclass cannot inherit from a superclass that has the subclass as an object member or as a superclass, or has the subclass in one of the object members or their superclasses
a subclass cannot inherit from a superclass that has the subclass as an object member or as a superclass or has the subclass in one of the object members or their superclasses
// get all objects from superclasses