Fix lambda_nocond.

This commit is contained in:
Dave Halter committed 2014-12-01 11:56:28 +01:00
1 parent bcd998ae02
commit 3cc4da28ed
2 files changed
+10

No files matched your search

+9
View File
@@ -95,3 +95,12 @@ class Test(object):
self.a
#? float()
pred(1.0, 2)
# -----------------
# test_nocond in grammar (happens in list comprehensions with `if`)
# -----------------
# Doesn't need to do anything yet. It should just not raise an error. These
# nocond lambdas make no sense at all.
#? int()
[a for a in [1,2] if lambda: 3][0]