Mirror of the Vim source from https://github.com/vim/vim
Revision | 97aaede2b4e04b3d229a8a5f86f7eb4cda1a02a1 (tree) |
---|---|
Time | 2022-12-19 07:15:02 |
Author | Bram Moolenaar <Bram@vim....> |
Commiter | Bram Moolenaar |
patch 9.0.1075: build fails if compiler doesn't allow declaration after case
Commit: https://github.com/vim/vim/commit/c336ae3ce60a2f047b72344ac827568606c5aa15
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 18 22:01:42 2022 +0000
@@ -696,6 +696,8 @@ | ||
696 | 696 | static int included_patches[] = |
697 | 697 | { /* Add new patch number below this line */ |
698 | 698 | /**/ |
699 | + 1075, | |
700 | +/**/ | |
699 | 701 | 1074, |
700 | 702 | /**/ |
701 | 703 | 1073, |
@@ -2188,29 +2188,32 @@ | ||
2188 | 2188 | case dest_vimvar: |
2189 | 2189 | return generate_STORE(cctx, ISN_STOREV, vimvaridx, NULL); |
2190 | 2190 | case dest_script: |
2191 | - int scriptvar_idx = lhs->lhs_scriptvar_idx; | |
2192 | - int scriptvar_sid = lhs->lhs_scriptvar_sid; | |
2193 | - if (scriptvar_idx < 0) | |
2194 | 2191 | { |
2195 | - isntype_T isn_type = ISN_STORES; | |
2196 | - | |
2197 | - if (SCRIPT_ID_VALID(scriptvar_sid) | |
2198 | - && SCRIPT_ITEM(scriptvar_sid)->sn_import_autoload | |
2199 | - && SCRIPT_ITEM(scriptvar_sid)->sn_autoload_prefix | |
2200 | - == NULL) | |
2192 | + int scriptvar_idx = lhs->lhs_scriptvar_idx; | |
2193 | + int scriptvar_sid = lhs->lhs_scriptvar_sid; | |
2194 | + if (scriptvar_idx < 0) | |
2201 | 2195 | { |
2202 | - // "import autoload './dir/script.vim'" - load script first | |
2203 | - if (generate_SOURCE(cctx, scriptvar_sid) == FAIL) | |
2204 | - return FAIL; | |
2205 | - isn_type = ISN_STOREEXPORT; | |
2206 | - } | |
2196 | + isntype_T isn_type = ISN_STORES; | |
2207 | 2197 | |
2208 | - // "s:" may be included in the name. | |
2209 | - return generate_OLDSCRIPT(cctx, isn_type, name, | |
2210 | - scriptvar_sid, type); | |
2198 | + if (SCRIPT_ID_VALID(scriptvar_sid) | |
2199 | + && SCRIPT_ITEM(scriptvar_sid)->sn_import_autoload | |
2200 | + && SCRIPT_ITEM(scriptvar_sid)->sn_autoload_prefix | |
2201 | + == NULL) | |
2202 | + { | |
2203 | + // "import autoload './dir/script.vim'" - load script | |
2204 | + // first | |
2205 | + if (generate_SOURCE(cctx, scriptvar_sid) == FAIL) | |
2206 | + return FAIL; | |
2207 | + isn_type = ISN_STOREEXPORT; | |
2208 | + } | |
2209 | + | |
2210 | + // "s:" may be included in the name. | |
2211 | + return generate_OLDSCRIPT(cctx, isn_type, name, | |
2212 | + scriptvar_sid, type); | |
2213 | + } | |
2214 | + return generate_VIM9SCRIPT(cctx, ISN_STORESCRIPT, | |
2215 | + scriptvar_sid, scriptvar_idx, type); | |
2211 | 2216 | } |
2212 | - return generate_VIM9SCRIPT(cctx, ISN_STORESCRIPT, | |
2213 | - scriptvar_sid, scriptvar_idx, type); | |
2214 | 2217 | case dest_class_member: |
2215 | 2218 | return generate_CLASSMEMBER(cctx, FALSE, |
2216 | 2219 | lhs->lhs_class, lhs->lhs_classmember_idx); |