File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ This section lists changes that do not have deprecation warnings.
1717 * ` ntuple(f, n::Integer) ` throws ` ArgumentError ` if ` n ` is negative.
1818 Previously an empty tuple was returned ([ #21697 ] ).
1919
20+ * Juxtaposing string literals (e.g. ` "x"y ` ) is now a syntax error ([ #20575 ] ).
21+
2022 * ` @__DIR__ ` returns the current working directory rather than ` nothing ` when not run
2123 from a file ([ #21759 ] ).
2224
Original file line number Diff line number Diff line change 876876 )
877877 (not (ts: space? s))
878878 (not (operator? t))
879- (not (initial-reserved-word? t))
880879 (not (closing-token? t))
881880 (not (newline? t))
881+ (or (not (string? expr)) ;; issue #20575
882+ (error "cannot juxtapose string literal"))
883+ (not (initial-reserved-word? t))
882884 (not (and (pair? expr) (syntactic-unary-op? (car expr))))
883885 ;; TODO: this would disallow juxtaposition with 0, which is ambiguous
884886 ;; with e.g. hex literals `0x...`. however this is used for `0im`, which
Original file line number Diff line number Diff line change @@ -1149,6 +1149,10 @@ f21586(; @m21586(a), @m21586(b)) = a + b
11491149end
11501150@test Test21604. X (1.0 ) === Test21604. X (1.0 )
11511151
1152+ # issue #20575
1153+ @test_throws ParseError parse (" \" a\" x" )
1154+ @test_throws ParseError parse (" \" a\" begin end" )
1155+
11521156# comment 298107224 on pull #21607
11531157module Test21607
11541158 using Base. Test
You can’t perform that action at this time.
0 commit comments