From: jjenista Date: Sun, 3 Apr 2011 18:51:44 +0000 (+0000) Subject: Add a warning when a method call does not resolve to a defined method X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1928b093d10e336becc5dfa0cf2d70db429b7fe4;p=IRC.git Add a warning when a method call does not resolve to a defined method --- diff --git a/Robust/src/IR/ClassDescriptor.java b/Robust/src/IR/ClassDescriptor.java index 24b5448f..136d64c3 100644 --- a/Robust/src/IR/ClassDescriptor.java +++ b/Robust/src/IR/ClassDescriptor.java @@ -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());