[pypy-svn] r28374 - pypy/dist/pypy/rpython

antocuni at codespeak.net antocuni at codespeak.net
Tue Jun 6 15:09:57 CEST 2006


Author: antocuni
Date: Tue Jun  6 15:09:56 2006
New Revision: 28374

Modified:
   pypy/dist/pypy/rpython/typesystem.py
Log:
Make possibile to use operator 'is' on BuiltinADTTypes too in ootypesystem.



Modified: pypy/dist/pypy/rpython/typesystem.py
==============================================================================
--- pypy/dist/pypy/rpython/typesystem.py	(original)
+++ pypy/dist/pypy/rpython/typesystem.py	Tue Jun  6 15:09:56 2006
@@ -125,8 +125,8 @@
             robj1 = robj2
         elif robj2.lowleveltype is lltype.Void:
             robj2 = robj1
-        if (not isinstance(robj1.lowleveltype, ootype.Instance) or
-            not isinstance(robj2.lowleveltype, ootype.Instance)) and \
+        if (not isinstance(robj1.lowleveltype, (ootype.Instance, ootype.BuiltinADTType)) or
+            not isinstance(robj2.lowleveltype, (ootype.Instance, ootype.BuiltinADTType))) and \
             (robj1.lowleveltype is not ootype.Class or
              robj2.lowleveltype is not ootype.Class):
             raise TyperError('is of instances of the non-instances: %r, %r' % (



More information about the Pypy-commit mailing list