@@ -574,13 +574,13 @@ f16517() = try error(); catch 0; end
574
574
# issue #16671
575
575
@test parse (" 1." ) === 1.0
576
576
577
+ isline (x) = isa (x,Expr) && x. head === :line
578
+
577
579
# issue #16672
578
- let isline (x) = isa (x,Expr) && x. head === :line
579
- @test count (isline, parse (" begin end" ). args) == 1
580
- @test count (isline, parse (" begin; end" ). args) == 1
581
- @test count (isline, parse (" begin; x+2; end" ). args) == 1
582
- @test count (isline, parse (" begin; x+2; y+1; end" ). args) == 2
583
- end
580
+ @test count (isline, parse (" begin end" ). args) == 1
581
+ @test count (isline, parse (" begin; end" ). args) == 1
582
+ @test count (isline, parse (" begin; x+2; end" ). args) == 1
583
+ @test count (isline, parse (" begin; x+2; y+1; end" ). args) == 2
584
584
585
585
# issue #16736
586
586
let
@@ -1084,3 +1084,22 @@ let prim = parse("primitive type X 8 end")
1084
1084
@test parse (" primitive type X 8\n end" ) == prim
1085
1085
@test parse (string (" primitive type X 8" , " \n " ^ 5 , " end" )) == prim
1086
1086
end
1087
+
1088
+ # issue #21155
1089
+ @test filter (! isline,
1090
+ parse (" module B
1091
+ using ..x,
1092
+ ..y
1093
+ end" ). args[3 ]. args)[1 ] ==
1094
+ Expr (:toplevel ,
1095
+ Expr (:using , Symbol (" ." ), Symbol (" ." ), :x ),
1096
+ Expr (:using , Symbol (" ." ), Symbol (" ." ), :y ))
1097
+
1098
+ @test filter (! isline,
1099
+ parse (" module A
1100
+ using .B,
1101
+ .C
1102
+ end" ). args[3 ]. args)[1 ] ==
1103
+ Expr (:toplevel ,
1104
+ Expr (:using , Symbol (" ." ), :B ),
1105
+ Expr (:using , Symbol (" ." ), :C ))
0 commit comments