Skip to content

Commit

Permalink
julia-syntax.scm: Remove deprecation warning (#19928)
Browse files Browse the repository at this point in the history
Changed & to .& to remove 0 .< A .< 1
deprecation warning

Fixes #19891
  • Loading branch information
Shade5 authored and tkelman committed Jan 14, 2017
1 parent 2680a01 commit 4186749
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
;; && sequences.
(define (expand-vector-compare e)
(comp-accum e
(lambda (a b) `(call & ,a ,b))
(lambda (a b) `(call .& ,a ,b))
(lambda (x) (not (length> x 2)))
(lambda (e)
(if (dotop? (cadr e))
Expand Down
8 changes: 8 additions & 0 deletions test/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,11 @@ end
@test filter(!isupper, str) == replace(str, r"[A-Z]", "")
@test filter(!islower, str) == replace(str, r"[a-z]", "")
end

# issue #19891
@testset "chained comparison" begin
B = 0 .< [1 -1 5] .< 3
@test B == [true false false]
B = 3 .> [1 -1 5] .> 0
@test B == [true false false]
end

0 comments on commit 4186749

Please sign in to comment.