Skip to content

Commit 5f5fe4e

Browse files
committed
Restrict any and all` argument type bounds
Changes the argument types for the `any` and `all` methods on tuples to not rely on julia base definining `all(::Tuple{}) = true` and `any(::Tuple{}) = false`.
1 parent 2e254a3 commit 5f5fe4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Static.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,9 +519,9 @@ Base.:(!)(::False) = True()
519519

520520
Base.all(::Tuple{Vararg{True}}) = true
521521
Base.all(::Tuple{Vararg{Union{True, False}}}) = false
522-
Base.all(::Tuple{Vararg{False}}) = false
522+
Base.all(::Tuple{False, Vararg{False}}) = false
523523

524-
Base.any(::Tuple{Vararg{True}}) = true
524+
Base.any(::Tuple{True, Vararg{True}}) = true
525525
Base.any(::Tuple{Vararg{Union{True, False}}}) = true
526526
Base.any(::Tuple{Vararg{False}}) = false
527527

0 commit comments

Comments
 (0)