Skip to content

Commit

Permalink
Merge pull request #22892 from JuliaLang/jb/7479
Browse files Browse the repository at this point in the history
better syntax error for `&&&`, fixes #7479
  • Loading branch information
JeffBezanson authored Jul 21, 2017
2 parents 1dea9d2 + cf354f7 commit e640f66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3599,7 +3599,8 @@ f(x) = yt(x)
(emit temp))))

((&)
(assert (and value (not tail)))
(if (or (not value) tail)
(error "misplaced \"&\" expression"))
`(& ,(compile (cadr e) break-labels value tail)))

((newvar)
Expand Down
3 changes: 3 additions & 0 deletions test/parse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1251,3 +1251,6 @@ end === (3, String)
# issue #22868
@test_throws ParseError parse("x@time 2")
@test_throws ParseError parse("@ time")

# issue #7479
@test expand(Main, parse("(true &&& false)")) == Expr(:error, "misplaced \"&\" expression")

2 comments on commit e640f66

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something went wrong when running your job:

NanosoldierError: failed to run benchmarks against primary commit: failed process: Process(`sudo cset shield -e su nanosoldier -- -c ./benchscript.sh`, ProcessExited(1)) [1]

Logs and partial data can be found here
cc @ararslan

Please sign in to comment.