Nice/src/bossa/syntax niceMethod.nice,1.27,1.28

Daniel Bonniot <[email protected]> Thu, 07 Apr 2005 22:28:15 +0000
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18928/src/bossa/syntax

Modified Files:
	niceMethod.nice 
Log Message:
Don't compile methods into classes imported from a different package.


Index: niceMethod.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/niceMethod.nice,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** niceMethod.nice	29 Mar 2005 16:18:39 -0000	1.27
--- niceMethod.nice	7 Apr 2005 22:28:12 -0000	1.28
***************
*** 360,370 ****
        receiver = getNiceClass(def.getArgTypes()[0]);
  
!       // JVM interfaces cannot contain code.
!       if (receiver != null && receiver.isInterface())
!         receiver = null;
! 
!       // Special treatment for serialization at the moment.
!       if (def.getArity() == 2 &&
!           (name.equals("writeObject")||name.equals("readObject")))
          receiver = null;
      }
--- 360,375 ----
        receiver = getNiceClass(def.getArgTypes()[0]);
  
!       if (receiver != null &&
! 	  (
! 	   // JVM interfaces cannot contain code.
! 	   receiver.isInterface()
! 	   ||
! 	   // For the moment, don't compile inside classes from another package
! 	   receiver.definition.module.pkg != def.module.pkg
! 	   ||
! 	   // Special treatment for serialization at the moment.
! 	   (def.getArity() == 2 &&
! 	    (name.equals("writeObject")||name.equals("readObject")))
! 	 ))
          receiver = null;
      }



-------------------------------------------------------
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