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

pedronis at codespeak.net pedronis at codespeak.net
Thu Jun 2 12:44:53 CEST 2005


Author: pedronis
Date: Thu Jun  2 12:44:53 2005
New Revision: 12994

Modified:
   pypy/dist/pypy/annotation/binaryop.py
Log:
mixing of pbcs and instances is not really supported anymore, the behavior of pbc methods is not
captured in the possible parent classdefs.



Modified: pypy/dist/pypy/annotation/binaryop.py
==============================================================================
--- pypy/dist/pypy/annotation/binaryop.py	(original)
+++ pypy/dist/pypy/annotation/binaryop.py	Thu Jun  2 12:44:53 2005
@@ -9,7 +9,7 @@
 from pypy.annotation.model import SomeTuple, SomeImpossibleValue
 from pypy.annotation.model import SomeInstance, SomeBuiltin, SomeIterator
 from pypy.annotation.model import SomePBC, SomeSlice, SomeFloat
-from pypy.annotation.model import unionof, UnionError, set, missing_operation
+from pypy.annotation.model import unionof, UnionError, set, missing_operation, TLS
 from pypy.annotation.bookkeeper import getbookkeeper
 from pypy.annotation.classdef import isclassdef
 from pypy.objspace.flow.model import Constant
@@ -463,6 +463,8 @@
         if classdef is None:
             # print warning?
             return SomeObject()
+        if not getattr(TLS, 'no_side_effects_in_union', 0):
+            raise UnionError("mixing pbc and instance not supported anymore:  %s %s" % (pbc, ins))
         return SomeInstance(classdef)
 
 class __extend__(pairtype(SomePBC, SomeInstance)):



More information about the Pypy-commit mailing list