[vim/vim] Vim9: E1041 when reloading an autoload script with exported variables (PR #20726)

0 views
Skip to first unread message

h_east

unread,
7:23 AM (3 hours ago) 7:23 AM
to vim/vim, Subscribed
Problem:  Sourcing a Vim9 autoload script more than once fails with E1041
          for its exported variables and constants, while exported functions
          reload without error.
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.

fixes: #19205


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20726

Commit Summary

  • 5f87bd2 Vim9: E1041 when reloading an autoload script with exported variables

File Changes

(5 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20726@github.com>

Reply all
Reply to author
Forward
0 new messages