Skip to content

Commit

Permalink
remove nearly all remaining deprecations (#28486)
Browse files Browse the repository at this point in the history
* Fix at-inferred with a single dot-broadcast op

* Mark .op type-inference-based completion of method signatures as broken

REPLCompletions allows tab-completion to show the possible signatures of a given function when in the midst of writing its arguments. It uses inference to determine the possible types of the already-written arguments, subsetting the possible signatures. With the removal of `.op` as a function, it is no longer able to infer these types and thus no longer subsets the signatures as previously expected. The failure mode is very graceful here -- it just assumes `Any` and shows more signatures. This can be re-implemented later
  • Loading branch information
JeffBezanson authored and KristofferC committed Feb 11, 2019
1 parent 9d26a8e commit d562fd6
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 642 deletions.
7 changes: 4 additions & 3 deletions base/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1079,9 +1079,10 @@ function __dot__(x::Expr)
Expr(x.head, x.args[1], dotargs[2])
else
if x.head == :&& || x.head == :||
Base.depwarn("""
using $(x.head) expressions in @. is deprecated; in the future it will
become elementwise. Break the expression into smaller parts instead.""", nothing)
error("""
Using `&&` and `||` is disallowed in `@.` expressions.
Use `&` or `|` for elementwise logical operations.
""")
end
head = string(x.head)
if last(head) == '=' && first(head) != '.'
Expand Down
6 changes: 0 additions & 6 deletions base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ function ip_matches_func(ip, func::Symbol)
end

function display_error(io::IO, er, bt)
if !isempty(bt)
st = stacktrace(bt)
if !isempty(st)
io = redirect(io, log_error_to, st[1])
end
end
printstyled(io, "ERROR: "; bold=true, color=Base.error_color())
# remove REPL-related frames from interactive printing
eval_ind = findlast(addr->ip_matches_func(addr, :eval), bt)
Expand Down
Loading

0 comments on commit d562fd6

Please sign in to comment.