_Platform:mac OS X 10.15, ubuntu 18.04
re-define value with same name in prompt cause no warning nor bugs.
I’m not sure from with version cause this. but at least 6.22 has the problem.
root:> double a =2
root:> double a =1
well spotted, that’s a recent feature, the interpreter now supports symbol redefinition. You can even do:
[ ] double a = 2.
[ ] int a = 42.
The motivation for the change in behavior is that it makes the interactive experience much less frustrating, especially in notebooks when you might want to re-execute certain code snippets (i.e. notebook cells) e.g. after fixing a typo.
Unfortunately I think there was an oversight and the feature has not been properly advertised in release notes or otherwise. We should definitely fix this. I opened https://sft.its.cern.ch/jira/browse/ROOT-10953 so we don’t forget.
Thank you very much for bringing this up!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.