Add support for Enum type for mgc version and also add default constructor. Comment...
[IRC.git] / Robust / src / IR / TypeUtil.java
index 72d8405105a3aab469b97530f4d4d5082c9bee7c..1eda9aa480a0967bafea88f0e3d86a2a529cb7b9 100644 (file)
@@ -296,6 +296,11 @@ NextMethod:
   }
 
   public boolean isSuperorType(TypeDescriptor possiblesuper, TypeDescriptor cd2) {
+    if(state.MGC) {
+      if(possiblesuper.isClass() && possiblesuper.class_desc.isEnum() && cd2.isInt()) {
+        return true;
+      }
+    }
     if (possiblesuper.isOffset() || cd2.isOffset()) return true;
     //Matching type are always okay
     if (possiblesuper.equals(cd2))