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

Function redefinition doesn't always work #17076

Closed
carlobaldassi opened this issue Jun 23, 2016 · 6 comments · Fixed by #17303
Closed

Function redefinition doesn't always work #17076

carlobaldassi opened this issue Jun 23, 2016 · 6 comments · Fixed by #17303
Labels
kind:bug Indicates an unexpected problem or unintended behavior kind:regression Regression in behavior compared to a previous version

Comments

@carlobaldassi
Copy link
Member

carlobaldassi commented Jun 23, 2016

I found that sometimes function overwriting does not work right away. The method redefinition warning gets triggered, but the old function definition is used.
Here is a minimal test case which shows the bug (the last call fails, but calling f() again then produces 2 as expected):

f() = 1

# at least two calls are required to trigger the bug
f()
f()

f() = 2

@assert f() == 2 # fails

This is on version 0.5.0-dev+4882.

@carlobaldassi carlobaldassi added the kind:bug Indicates an unexpected problem or unintended behavior label Jun 23, 2016
@vtjnash
Copy link
Sponsor Member

vtjnash commented Jun 23, 2016

I was wondering when someone would notice this. (not a duplicate of #265)

@StefanKarpinski
Copy link
Sponsor Member

StefanKarpinski commented Jun 23, 2016

You want to explain what you changed, @vtjnash?

@oxinabox
Copy link
Contributor

I had been finding this also, kinda thought either it was by design (no redefining consts) or that someone else had reported it.

@tkelman
Copy link
Contributor

tkelman commented Jul 7, 2016

You want to explain what you changed, @vtjnash?

Apparently not?

@vtjnash
Copy link
Sponsor Member

vtjnash commented Jul 7, 2016

What better way to explain?

@tkelman
Copy link
Contributor

tkelman commented Jul 7, 2016

A function with no comments or tests doesn't actually explain what was going wrong in a way that anyone other than you understands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Indicates an unexpected problem or unintended behavior kind:regression Regression in behavior compared to a previous version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants