[pypy-commit] pypy default: Make this assert explain what it really means. Took me a day

fijal noreply at buildbot.pypy.org
Wed May 15 21:43:45 CEST 2013


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r64203:38a4717300ff
Date: 2013-05-15 21:42 +0200
http://bitbucket.org/pypy/pypy/changeset/38a4717300ff/

Log:	Make this assert explain what it really means. Took me a day

diff --git a/rpython/rtyper/rpbc.py b/rpython/rtyper/rpbc.py
--- a/rpython/rtyper/rpbc.py
+++ b/rpython/rtyper/rpbc.py
@@ -529,7 +529,7 @@
 
         im_selves = []
         for desc in s_pbc.descriptions:
-            assert desc.funcdesc is self.funcdesc
+            assert desc.funcdesc is self.funcdesc, "You can't mix a set of methods on a frozen PBC in RPython that are different underlaying functions"
             im_selves.append(desc.frozendesc)
 
         self.s_im_self = annmodel.SomePBC(im_selves)


More information about the pypy-commit mailing list