Nice/src/gnu/bytecode ClassType.java,1.21,1.22
Daniel Bonniot <[email protected]>
| Newsgroups | gmane.comp.lang.nice.cvs |
|---|---|
| Message-ID | <[email protected]> |
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;
}
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click