File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 1846
1846
(error " invalid comprehension syntax" )))
1847
1847
(else
1848
1848
(if (and (pair? vec) (not (ts:space? s)))
1849
- (error (string " expected separator between arguments to \" [ ]\" ; got \" "
1849
+ (error (string " expected \" " closer " \" or separator in arguments to \" "
1850
+ (if (eqv? closer #\] ) #\[ #\{ ) " " closer
1851
+ " \" ; got \" "
1850
1852
(deparse (car vec)) t " \" " )))
1851
1853
(loop (cons (parse-eq* s) vec) outer))))))))
1852
1854
Original file line number Diff line number Diff line change @@ -1239,6 +1239,9 @@ end
1239
1239
@test raw " x \\\ y" == " x \\\\\\ y"
1240
1240
end
1241
1241
1242
+ @test_throws ParseError (" expected \" }\" or separator in arguments to \" { }\" ; got \" V)\" " ) Meta. parse (" f(x::V) where {V) = x" )
1243
+ @test_throws ParseError (" expected \" ]\" or separator in arguments to \" [ ]\" ; got \" 1)\" " ) Meta. parse (" [1)" )
1244
+
1242
1245
# issue #9972
1243
1246
@test Meta. lower (@__MODULE__ , :(f (;3 ))) == Expr (:error , " invalid keyword argument syntax \" 3\" " )
1244
1247
You can’t perform that action at this time.
0 commit comments