From efb14c0bcfe7ba555dda55a637ebcbd8c5caf655 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Thu, 10 Jun 2021 14:28:02 +0200 Subject: [PATCH] Allow disabling scalar iteration. For use in the REPL, and to not cause depwarns for everyone. --- src/host/indexing.jl | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/host/indexing.jl b/src/host/indexing.jl index af270e1f..0e6e0bdb 100644 --- a/src/host/indexing.jl +++ b/src/host/indexing.jl @@ -20,12 +20,9 @@ function allowscalar(f::Base.Callable) task_local_storage(f, :ScalarIndexing, ScalarAllowed) end -# deprecated function allowscalar(allow::Bool=true) if allow Base.depwarn("allowscalar([true]) is deprecated, use `allowscalar() do end` or `@allowscalar` to denote exactly which operations can use scalar operations.", :allowscalar) - else - Base.depwarn("allowscalar(false) is deprecated; scalar indexing is now disabled by default.", :allowscalar) end task_local_storage(:ScalarIndexing, allow ? ScalarAllowed : ScalarDisallowed) return