[pypy-svn] r35710 - pypy/dist/pypy/annotation

arigo at codespeak.net arigo at codespeak.net
Wed Dec 13 22:47:00 CET 2006


Author: arigo
Date: Wed Dec 13 22:46:59 2006
New Revision: 35710

Modified:
   pypy/dist/pypy/annotation/builtin.py
Log:
Minor fix to preserve the 'const' attribute if possible.


Modified: pypy/dist/pypy/annotation/builtin.py
==============================================================================
--- pypy/dist/pypy/annotation/builtin.py	(original)
+++ pypy/dist/pypy/annotation/builtin.py	Wed Dec 13 22:46:59 2006
@@ -224,7 +224,7 @@
         return s_iter.next()
     else:
         s = unionof(*s_values)
-        if type(s) is SomeInteger:
+        if type(s) is SomeInteger and not s.nonneg:
             nonneg = False
             for s1 in s_values:
                 nonneg |= s1.nonneg



More information about the Pypy-commit mailing list