[pypy-svn] r32691 - pypy/dist/pypy/objspace/flow

mwh at codespeak.net mwh at codespeak.net
Thu Sep 28 14:15:12 CEST 2006


Author: mwh
Date: Thu Sep 28 14:15:11 2006
New Revision: 32691

Modified:
   pypy/dist/pypy/objspace/flow/model.py
Log:
there is not always a default in the multi-valued switch case.


Modified: pypy/dist/pypy/objspace/flow/model.py
==============================================================================
--- pypy/dist/pypy/objspace/flow/model.py	(original)
+++ pypy/dist/pypy/objspace/flow/model.py	Thu Sep 28 14:15:11 2006
@@ -652,8 +652,9 @@
                     # a multiple-cases switch (or else the False and True
                     # branches are in the wrong order)
                     assert len(block.exits) >= 1
-                    assert block.exits[-1].exitcase == "default"
                     cases = [Constant(link.exitcase) for link in block.exits]
+                    if 'default' in cases:
+                        assert 'default' == cases[-1]
                     assert len(dict.fromkeys(cases)) == len(cases)
 
             allexitcases = {}



More information about the Pypy-commit mailing list