Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a bug? relevant for > 0.4.6 #22378

Closed
rudolfII opened this issue Jun 15, 2017 · 2 comments
Closed

a bug? relevant for > 0.4.6 #22378

rudolfII opened this issue Jun 15, 2017 · 2 comments

Comments

@rudolfII
Copy link

Hello,

the following code behaves unexpectedly:

if 1>0
beta = 0.5
print("1. beta=",beta,"\n")

for i1=1:2
end

print("2. beta = ", beta, "\n")

end
print("3. beta = ", beta, "\n")

It produces:

beta=beta
beta = beta
beta = 0.5
WARNING: imported binding for beta overwritten in module Main

while if you comment out the for cycle, you always get the
expected beta = 0.5.

Please note that the result shown above is only seen
if the kerner runs for the first time over the code.

Also note, it's not the warning but the printing of 'beta=beta'
that bothers us.

Version 0.4.6 behaves, in contrast, as expected (we get 0.5).

Thanks for your work
Ruda

@yuyichao
Copy link
Contributor

Dup of #2586 and #21989

@JeffBezanson
Copy link
Member

Also related to #18933 I'd say.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants