Open mtshiba opened 3 months ago
If we use array comprehension to return the result without any processing, a syntax error will occur. It's simply a parser bug.
print! [ x | x <- [1, 2] ]
[1, 2]
Error[#0761]: File <stdin>, line 1, 1 │ print! [ x | x <- [1, 2] ] · -- SyntaxError: expected: VBar, got: Inclusion
The following code works.
lc = [i * 2 | i <- 1..4] assert lc == [2, 4, 6, 8] lc2 = [i + 1 | i <- 1..5 | i <= 3] assert lc2 == [2, 3, 4] lc3 = [i <- 1..10 | i <= 5] assert lc3 == [1, 2, 3, 4, 5]
0.6.32
None
Describe the bug?
If we use array comprehension to return the result without any processing, a syntax error will occur. It's simply a parser bug.
Reproducible code
Expected result
Actual result
Additional context
The following code works.
Erg version
0.6.32
Python version
None
OS
None