fix Jim's bug
authorbdemsky <bdemsky>
Fri, 20 Feb 2009 22:43:33 +0000 (22:43 +0000)
committerbdemsky <bdemsky>
Fri, 20 Feb 2009 22:43:33 +0000 (22:43 +0000)
Robust/src/IR/TypeUtil.java

index 019e3130257c7fe32d29b971d75c95ecd7e2a6aa..4bdc79e648b3dd369aeb8cb2c1aa86c9eaef69a0 100644 (file)
@@ -117,8 +117,12 @@ public class TypeUtil {
       if (!this.isSuperorType(md2.getParamType(i), md1.getParamType(i)))
        return false;
     }
-    if (!this.isSuperorType(md2.getReturnType(), md1.getReturnType()))
-      return false;
+    if (md1.getReturnType()==null||md2.getReturnType()==null) {
+       if (md1.getReturnType()!=md2.getReturnType())
+           return false;
+    } else
+       if (!this.isSuperorType(md2.getReturnType(), md1.getReturnType()))
+           return false;
 
     if (!this.isSuperorType(md2.getClassDesc(), md1.getClassDesc()))
       return false;