Author: Spenser Bauman <saba...@gmail.com>
Branch: value-classes
Changeset: r87256:2c44eef6d8bd
Date: 2016-09-20 12:24 -0400
http://bitbucket.org/pypy/pypy/changeset/2c44eef6d8bd/

Log:    Fix test

diff --git a/rpython/rtyper/rclass.py b/rpython/rtyper/rclass.py
--- a/rpython/rtyper/rclass.py
+++ b/rpython/rtyper/rclass.py
@@ -587,12 +587,6 @@
                 "class %r: _value_class_ = True requires that "
                 "_immutable_ = True as well")
         else:
-            # Value classes may only be subclasses of other value classes
-            basedesc = classdesc.basedesc
-            if basedesc and not basedesc.get_param('_value_class_', False):
-                raise ValueClassConflictError(
-                    "class %r: _value_class_ = True, but its parent "
-                    "class %r does not")
             hints['value_class'] = True
         return hints
 
diff --git a/rpython/rtyper/test/test_rclass.py 
b/rpython/rtyper/test/test_rclass.py
--- a/rpython/rtyper/test/test_rclass.py
+++ b/rpython/rtyper/test/test_rclass.py
@@ -1341,11 +1341,11 @@
         from rpython.rtyper.rclass import ValueClassConflictError
 
         class Base(object):
-            _immutable_ = True
+            _immutable_   = True
+            _value_class_ = True
 
         class I(Base):
             _immutable_   = True
-            _value_class_ = True
 
             def __init__(self, v):
                 self.v = v
@@ -1355,3 +1355,4 @@
             return i.v
 
         py.test.raises(ValueClassConflictError, self.gengraph, f, [])
+
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to