fixed bug with wrong method being called in inheritance situations
[IRC.git] / Robust / src / IR / Tree / SemanticCheck.java
index 7509695717ceff69a2612fbcbe79f35ef108b3ff..7dcb5eb1f8b8917f96accd6f86a62e3892c6fdf7 100644 (file)
@@ -576,6 +576,10 @@ public class SemanticCheck {
        }
        if (!typeutil.isSuperorType(md2.getReturnType(), md1.getReturnType()))
                return false;
+
+       if (!typeutil.isSuperorType(md2.getClassDesc(), md1.getClassDesc()))
+               return false;
+
        return true;
     }
 
@@ -663,7 +667,6 @@ public class SemanticCheck {
                checkExpressionNode(md, nametable, min.getExpression(), null);
            }
        }
-
     }