Skip to content

Commit

Permalink
add back wordaround for Slot objects should not occur in an AST in …
Browse files Browse the repository at this point in the history
…Ipython mode (#47878)

(cherry picked from commit 7b10d5f)
  • Loading branch information
KristofferC authored and KristofferC committed Dec 16, 2022
1 parent a506f43 commit 3e1373e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stdlib/REPL/src/REPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1404,9 +1404,9 @@ end

function out_transform(@nospecialize(x), n::Ref{Int})
return quote
let x = $x
$capture_result($n, x)
x
let __temp_val_a72df459 = $x
$capture_result($n, __temp_val_a72df459)
__temp_val_a72df459
end
end
end
Expand Down
4 changes: 4 additions & 0 deletions stdlib/REPL/test/repl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,10 @@ fake_repl() do stdin_write, stdout_read, repl
s = sendrepl2("REPL\n", "In [10]")
@test contains(s, "Out[9]: REPL")

# Test for https://github.com/JuliaLang/julia/issues/46451
s = sendrepl2("x_47878 = range(-1; stop = 1)\n", "-1:1")
@test contains(s, "Out[11]: -1:1")

write(stdin_write, '\x04')
Base.wait(repltask)
end

0 comments on commit 3e1373e

Please sign in to comment.