Skip to content

Commit 003a14f

Browse files
authored
Merge pull request #21124 from JuliaLang/jb/unarysubtype
fix unary `<:` and `>:` call syntax
2 parents 90cfb82 + 1d79a03 commit 003a14f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/julia-syntax.scm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,7 @@
15861586

15871587
;; convert an operator parsed as (op a b) to (call op a b)
15881588
(define (syntactic-op-to-call e)
1589-
`(call ,(car e) ,(expand-forms (cadr e)) ,(expand-forms (caddr e))))
1589+
`(call ,(car e) ,@(map expand-forms (cdr e))))
15901590

15911591
;; wrap `expr` in a function appropriate for consuming values from given ranges
15921592
(define (func-for-generator-ranges expr range-exprs)

test/parse.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,3 +1056,5 @@ macro make_f21054(T)
10561056
end
10571057
@eval @make_f21054 $Array
10581058
@test isa(f21054, Function)
1059+
g21054(>:) = >:2
1060+
@test g21054(-) == -2

0 commit comments

Comments
 (0)