Add a warning when a method call does not resolve to a defined method
authorjjenista <jjenista>
Sun, 3 Apr 2011 18:51:44 +0000 (18:51 +0000)
committerjjenista <jjenista>
Sun, 3 Apr 2011 18:51:44 +0000 (18:51 +0000)
Robust/src/IR/ClassDescriptor.java

index 24b5448f4c4580dec6816018eff714afd1f4ea6b..136d64c357e98cfafe555d8993e7e3c09bb52078 100644 (file)
@@ -197,6 +197,12 @@ public class ClassDescriptor extends Descriptor {
     ClassDescriptor cn=this;
     while(true) {
       if (cn==null) {
+        // TODO: the original code returned "null" if no super class
+        // ever defines the method.  Is there a situation where this is
+        // fine and the client should take other actions?  If not, we should
+        // change this warning to an error.
+        System.out.println( "ClassDescriptor.java: WARNING "+md+
+                            " did not resolve to an actual method." );
        return null;
       }
       Set possiblematches=cn.getMethodTable().getSetFromSameScope(md.getSymbol());