test: list comprehension name resolve should not include its own definitions

This commit is contained in:
Dave Halter
2014-06-09 12:53:17 +02:00
parent 496671966b
commit c48146093e

View File

@@ -131,6 +131,12 @@ a = [a if 1.0 else '' for a in [1] if [1.0]]
#? int() str() #? int() str()
a[0] a[0]
# name resolve should be correct
left, right = 'a', 'b'
left, right = [x for x in (left, right)]
#? str()
left
# with a dict literal # with a dict literal
#? str() #? str()
[a for a in {1:'x'}][0] [a for a in {1:'x'}][0]