From 5fac632d466369a9cec7ba5e48fcd091e81d4b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Crist=C3=B3v=C3=A3o=20D=2E=20Sousa?= Date: Sat, 2 Sep 2017 02:55:12 +0100 Subject: [PATCH] Add tests to #23519 --- test/parse.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/parse.jl b/test/parse.jl index 39efcf354657a2..73314f8bd408d2 100644 --- a/test/parse.jl +++ b/test/parse.jl @@ -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])") +