[Nice-commit] Nice/src/gnu/bytecode ClassType.java,1.21,1.22
Brought to you by:
bonniot
|
From: Daniel B. <bo...@us...> - 2005-03-01 19:25:10
|
Update of /cvsroot/nice/Nice/src/gnu/bytecode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25943/src/gnu/bytecode Modified Files: ClassType.java Log Message: Don't consider a bytecode method a refinement if it does not have the same return type or a subtype. Index: ClassType.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/bytecode/ClassType.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ClassType.java 19 Feb 2004 08:12:37 -0000 1.21 --- ClassType.java 1 Mar 2005 19:24:40 -0000 1.22 *************** *** 738,745 **** { Method res = getMethod(method.getName(), method.arg_types); ! if (res == method) return null; ! else ! return res; } --- 738,748 ---- { Method res = getMethod(method.getName(), method.arg_types); ! ! if (res == method || res == null || ! // A method with a non-subtype return type is not a refinement ! ! res.getReturnType().isSubtype(method.getReturnType())) return null; ! ! return res; } |