Skip to content

Commit

Permalink
add <: case to __dot__
Browse files Browse the repository at this point in the history
  • Loading branch information
ssikdar1 committed Mar 13, 2020
1 parent 813de45 commit c364df6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,8 @@ function __dot__(x::Expr)
elseif (x.head === :(=) || x.head === :function || x.head === :macro) &&
Meta.isexpr(x.args[1], :call) # function or macro definition
Expr(x.head, x.args[1], dotargs[2])
elseif x.head === :(<:)
Expr(:(.<:), dotargs...)
else
if x.head === :&& || x.head === :||
error("""
Expand Down
3 changes: 3 additions & 0 deletions test/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -857,3 +857,6 @@ end

# 28680
@test 1 .+ 1 .+ (1, 2) == (3, 4)

ret = @macroexpand @.([Int, Number] <: Real)
@test ret == :($(Expr(:.<:, :([Int, Number]), :Real)))

0 comments on commit c364df6

Please sign in to comment.