Skip to content

Commit

Permalink
Add tests to JuliaLang#23519
Browse files Browse the repository at this point in the history
  • Loading branch information
cdsousa committed Sep 22, 2017
1 parent 1661796 commit 5fac632
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/parse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1346,3 +1346,12 @@ end
x::Int -> 2
end
end) == Expr(:error, "local variable Int cannot be used in closure declaration")

# issue #23519
@test parse("@foo[1]") == parse("@foo([1])")
@test parse("@foo[1 2; 3 4]") == parse("@foo([1 2; 3 4])")
@test parse("@foo[1] + [2]") == parse("@foo([1]) + [2]")
@test parse("@foo [1] + [2]") == parse("@foo([1] + [2])")
@test parse("@Mdl.foo[1] + [2]") == parse("@Mdl.foo([1]) + [2]")
@test parse("@Mdl.foo [1] + [2]") == parse("@Mdl.foo([1] + [2])")

0 comments on commit 5fac632

Please sign in to comment.