Author: Carl Friedrich Bolz <cfb...@gmx.de>
Branch: 
Changeset: r73945:1ab7d7e2bff6
Date: 2014-10-14 12:08 +0200
http://bitbucket.org/pypy/pypy/changeset/1ab7d7e2bff6/

Log:    forgot about SomeImpossibleValue

diff --git a/rpython/rlib/debug.py b/rpython/rlib/debug.py
--- a/rpython/rlib/debug.py
+++ b/rpython/rlib/debug.py
@@ -400,10 +400,13 @@
     def compute_result_annotation(self, s_arg):
         from rpython.annotator.model import SomeList, s_None
         from rpython.annotator.model import SomeChar, SomeUnicodeCodePoint
+        from rpython.annotator.model import SomeImpossibleValue
         if s_None.contains(s_arg):
             return s_arg    # only None: just return
         assert isinstance(s_arg, SomeList)
-        if not isinstance(s_arg.listdef.listitem.s_value, (SomeChar, 
SomeUnicodeCodePoint)):
+        if not isinstance(
+                s_arg.listdef.listitem.s_value,
+                (SomeChar, SomeUnicodeCodePoint, SomeImpossibleValue)):
             raise NotAListOfChars
         return s_arg
 
diff --git a/rpython/rlib/test/test_debug.py b/rpython/rlib/test/test_debug.py
--- a/rpython/rlib/test/test_debug.py
+++ b/rpython/rlib/test/test_debug.py
@@ -76,6 +76,8 @@
 
 def test_check_list_of_chars():
     def f(x):
+        result = []
+        check_list_of_chars(result)
         result = [chr(x), 'a']
         check_list_of_chars(result)
         result = [unichr(x)]
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to