From 1928b093d10e336becc5dfa0cf2d70db429b7fe4 Mon Sep 17 00:00:00 2001 From: jjenista Date: Sun, 3 Apr 2011 18:51:44 +0000 Subject: [PATCH] Add a warning when a method call does not resolve to a defined method --- Robust/src/IR/ClassDescriptor.java | 6 ++++++ 1 file changed, 6 insertions(+) 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()); -- 2.34.1