-
Notifications
You must be signed in to change notification settings - Fork 22
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
Not possible to redefine functions #70
Comments
Apparently it is also problematic to use any anonymous function after the first one: julia> using Infiltrator
julia> @infiltrate
Infiltrating top-level frame:
infil> x -> x
#1 (generic function with 1 method)
infil> x -> x
ERROR: cannot declare #1#2 constant; it already has a value
Stacktrace:
[1] top-level scope
@ none:0
infil> x -> sin(x)
ERROR: cannot declare #1#2 constant; it already has a value
Stacktrace:
[1] top-level scope
@ none:0 |
Thank you for the fix. FWIW I have noticed that sometimes the error still appears but after executing it again once or twice it disappears and everything works correctly. |
Any chance you can find a reproducer for this? |
It has been tricky because every time this happens once I cannot reproduce it really. infil> δ_progression
47-element Vector{Float32}:
9.0
8.099999
7.2899995
6.5609994
5.904899
3.8742042
3.1381054
2.8242948
2.5418653
2.2876787
2.0589108
1.8530197
0.98477054
0.71789765
0.64610785
0.5814971
0.5233474
0.47101262
0.42391136
0.3815202
0.41967225
0.4616395
0.41547555
0.4570231
0.5027254
0.552998
0.4976982
0.547468
0.6022148
0.6624363
0.59619266
0.65581197
0.72139317
0.7935325
0.7141792
0.8641569
0.7777412
10717.776
1.4769782f8
2.035371f12
2.8048722f16
3.8652953f20
5.326624f24
7.3404295f28
1.0115581f33
1.3939916f37
Inf
infil> findfirst(x -> x > 1, δ_progression)
1
infil> findfirst(x -> x > 10, δ_progression)
ERROR: cannot declare #3#4 constant; it already has a value
Stacktrace:
[1] top-level scope
@ none:0
infil> findfirst(x -> x > 10, δ_progression)
ERROR: cannot declare #5#6 constant; it already has a value
Stacktrace:
[1] top-level scope
@ none:0
infil> findfirst(x -> x > 10, δ_progression)
38 |
Is it possible to redefine functions inside infiltrator somehow?
The text was updated successfully, but these errors were encountered: