Pluto.jl
Pluto.jl copied to clipboard
cannot assign a value to variable BuiltinsNotebook.br from module workspace#41
I have a weird error if I use a variable called br
:
Video:
https://user-images.githubusercontent.com/52289/157880953-501fe517-4776-4720-a669-b3e32c398819.mov
Notebook:
I haven't tried all the two letter variable name possibilities but I have a sneaking suspicion that it's something to do with HTML...
I guess it conflicts with PlutoUI.br
some way
Smaller example
# ╔═╡ 5919be3d-f8ce-4a0a-ab36-2d3975ca9aa9
using PlutoUI
# ╔═╡ b9bf1762-9a6a-4a78-9240-2adace14d2e2
begin
br = 10
for _ in a
br
end
end
Smaller example
This also happens in the REPL.
In my understanding, the error should only happens if you reference the variable before the assignment. Does it have something to do with the for loop scope ?
using PlutoUI
begin
br
br = 1 # Fails
end
using PlutoUI
begin
br = 1 # Succeeds
end
using PlutoUI
begin
br = 1 # Fails but shouldn't?
for _ in false
br
end
end
Follow up issue in https://github.com/JuliaLang/julia/issues/44604
@Pangoraw what an amazing find D: