Skip to content

Commit

Permalink
add local to outer description (#29010)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkamins authored and JeffBezanson committed Sep 6, 2018
1 parent 88d536a commit bda5dd8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/src/manual/variables-and-scoping.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ julia> f()
0
```

However, it is occasionally useful to reuse an existing variable as the iteration variable.
However, it is occasionally useful to reuse an existing local variable as the iteration variable.
This can be done conveniently by adding the keyword `outer`:

```jldoctest
Expand Down
2 changes: 1 addition & 1 deletion src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -2430,7 +2430,7 @@
'(null))
((eq? (car e) 'require-existing-local)
(if (not (memq (cadr e) env))
(error "no outer variable declaration exists for \"for outer\""))
(error "no outer local variable declaration exists for \"for outer\""))
'(null))
((eq? (car e) 'lambda)
(let* ((lv (lam:vars e))
Expand Down
2 changes: 1 addition & 1 deletion test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3256,7 +3256,7 @@ let
@test forouter() == 3
end

@test_throws ErrorException("syntax: no outer variable declaration exists for \"for outer\"") @eval function f()
@test_throws ErrorException("syntax: no outer local variable declaration exists for \"for outer\"") @eval function f()
for outer i = 1:2
end
end
Expand Down

2 comments on commit bda5dd8

@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(`make -j3 USECCACHE=1`, ProcessExited(2)) [2]

Logs and partial data can be found here
cc @ararslan

Please sign in to comment.