patch 9.2.0814: Vim9: E1041 when reloading an autoload script with exported variables
Problem: Sourcing a Vim9 autoload script more than once fails with E1041
for its exported variables and constants, while exported functions
reload without error (ubaldot)
Solution: Give exported variables and constants the same clean slate as
functions on reload by removing them from the global namespace, so
the script body can define them again. Keep classes and enums:
objects created from the previous definition still refer to it, so
they are not redefined this way (Hirohito Higashi)
fixes: #19205
closes: #20726
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>