[pypy-svn] r73106 - in pypy/branch/reduce-instance-size-experiments/pypy/rlib: . test

cfbolz at codespeak.net cfbolz at codespeak.net
Mon Mar 29 19:22:03 CEST 2010


Author: cfbolz
Date: Mon Mar 29 19:22:01 2010
New Revision: 73106

Modified:
   pypy/branch/reduce-instance-size-experiments/pypy/rlib/rerased.py
   pypy/branch/reduce-instance-size-experiments/pypy/rlib/test/test_rerased.py
Log:
glub. What a nonsense.


Modified: pypy/branch/reduce-instance-size-experiments/pypy/rlib/rerased.py
==============================================================================
--- pypy/branch/reduce-instance-size-experiments/pypy/rlib/rerased.py	(original)
+++ pypy/branch/reduce-instance-size-experiments/pypy/rlib/rerased.py	Mon Mar 29 19:22:01 2010
@@ -115,7 +115,7 @@
 class __extend__(pairtype(SomeErased, SomeErased)):
 
     def union((serased1, serased2)):
-        return serased1
+        return SomeErased()
 
 
 class ErasedRepr(Repr):

Modified: pypy/branch/reduce-instance-size-experiments/pypy/rlib/test/test_rerased.py
==============================================================================
--- pypy/branch/reduce-instance-size-experiments/pypy/rlib/test/test_rerased.py	(original)
+++ pypy/branch/reduce-instance-size-experiments/pypy/rlib/test/test_rerased.py	Mon Mar 29 19:22:01 2010
@@ -124,3 +124,10 @@
     assert foo() is None
     res = interpret(foo, [])
     assert not res
+
+def test_union():
+    s_e1 = SomeErased()
+    s_e1.const = 1
+    s_e2 = SomeErased()
+    s_e2.const = 3
+    assert not annmodel.pair(s_e1, s_e2).union().is_constant()



More information about the Pypy-commit mailing list