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

pedronis at codespeak.net pedronis at codespeak.net
Fri Jun 17 16:06:07 CEST 2005


Author: pedronis
Date: Fri Jun 17 16:06:06 2005
New Revision: 13539

Modified:
   pypy/dist/pypy/rpython/normalizecalls.py
Log:
check that callables in bound methods are not present in freestanding form



Modified: pypy/dist/pypy/rpython/normalizecalls.py
==============================================================================
--- pypy/dist/pypy/rpython/normalizecalls.py	(original)
+++ pypy/dist/pypy/rpython/normalizecalls.py	Fri Jun 17 16:06:06 2005
@@ -65,6 +65,9 @@
             if isinstance(functions[0], types.MethodType):
                 methfunc = functions[0].im_func
                 assert functions[0].im_self is not None
+                if (None, methfunc) in call_families:
+                    raise TypeError("function appears both in bound method and"
+                                    "freestanding: %r" % methfunc)
                 for func in functions:
                     if getattr(func, 'im_func', None) is not methfunc:
                         raise TypeError("invalid familily of bound methods: %r" %



More information about the Pypy-commit mailing list