[pypy-commit] pypy const-correctness: Fix
amauryfa
noreply at buildbot.pypy.org
Fri Sep 13 21:55:11 CEST 2013
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: const-correctness
Changeset: r66940:b3d07d1dab74
Date: 2013-09-13 21:52 +0200
http://bitbucket.org/pypy/pypy/changeset/b3d07d1dab74/
Log: Fix
diff --git a/rpython/rtyper/lltypesystem/lltype.py b/rpython/rtyper/lltypesystem/lltype.py
--- a/rpython/rtyper/lltypesystem/lltype.py
+++ b/rpython/rtyper/lltypesystem/lltype.py
@@ -128,7 +128,7 @@
object.__setattr__(self, attr, nvalue)
def _enforce(self, value):
- if typeOf(value) != self:
+ if not isConvertibleFrom(self, typeOf(value)):
raise TypeError
return value
More information about the pypy-commit
mailing list