1
0
forked from aniani/vim

745 Commits

Author SHA1 Message Date
Bram Moolenaar
17a836cbee patch 8.2.1429: Vim9: no error for missing white after : in dict
Problem:    Vim9: no error for missing white after : in dict.
Solution:   Check for white space. (closes #6671)  Also check that there is no
            white before the :.
2020-08-12 17:35:58 +02:00
Bram Moolenaar
7c5ad34878 patch 8.2.1427: Vim9: cannot use a range with marks in :def function
Problem:    Vim9: cannot use a range with marks in :def function.
Solution:   Parse range after colon. (closes #6686)
2020-08-12 15:48:55 +02:00
Bram Moolenaar
a177344dc0 patch 8.2.1426: Vim9: cannot call autoload function in :def function
Problem:    Vim9: cannot call autoload function in :def function.
Solution:   Load the autoload script. (closes #6690)
2020-08-12 15:21:22 +02:00
Bram Moolenaar
575f24b3f3 patch 8.2.1425: Vim9: cannot use call() without :call
Problem:    Vim9: cannot use call() without :call.
Solution:   Do not skip over "call(". (closes #6689)
2020-08-12 14:21:11 +02:00
Bram Moolenaar
4301a729ea patch 8.2.1421: Vim9: handling "+" and "-" before number differs from script
Problem:    Vim9: handling "+" and "-" before number differs from Vim script.
Solution:   Use the same sequence of commands.
2020-08-11 20:51:08 +02:00
Bram Moolenaar
59eccb92e3 patch 8.2.1419: Vim9: not operator applied too early
Problem:    Vim9: not operator applied too early.
Solution:   Implement the "numeric_only" argument. (closes #6680)
2020-08-10 23:09:37 +02:00
Bram Moolenaar
64d662d5fc patch 8.2.1408: Vim9: type casting not supported
Problem:    Vim9: type casting not supported.
Solution:   Introduce type casting.
2020-08-09 19:02:50 +02:00
Bram Moolenaar
127542bceb patch 8.2.1407: Vim9: type of list and dict only depends on first item
Problem:    Vim9: type of list and dict only depends on first item.
Solution:   Use all items to decide about the type.
2020-08-09 17:22:04 +02:00
Bram Moolenaar
a7cc9e697b patch 8.2.1405: Vim9: vim9compile.c is getting too big
Problem:    Vim9: vim9compile.c is getting too big.
Solution:   Split off type code to vim9type.c.
2020-08-09 15:25:14 +02:00
Bram Moolenaar
efa94447e8 patch 8.2.1399: Vim9: may find imported item in wrong script
Problem:    Vim9: may find imported item in wrong script.
Solution:   When looking up script-local function use the embedded script ID.
            (issue #6644)
2020-08-08 22:16:00 +02:00
Bram Moolenaar
5a849da57c patch 8.2.1396: Vim9: no error for unexpectedly returning a value
Problem:    Vim9: no error for unexpectedly returning a value.
Solution:   Only set the return type for lambda's.  Make using function type
            in a function reference work.
2020-08-08 16:47:30 +02:00
Bram Moolenaar
98b4f145eb patch 8.2.1395: Vim9: no error if declaring a funcref with lower case letter
Problem:    Vim9: no error if declaring a funcref with a lower case letter.
Solution:   Check the name after the type is inferred. Fix confusing name.
2020-08-08 15:46:01 +02:00
Bram Moolenaar
2dd0a2c39a patch 8.2.1394: Vim9: compiling a function interferes with command modifiers
Problem:    Vim9: compiling a function interferes with command modifiers.
Solution:   Save and restore command modifiers. (closes #6658)
2020-08-08 15:10:27 +02:00
Bram Moolenaar
fa211f3c6d patch 8.2.1391: Vim9: no error for shadowing a script function
Problem:    Vim9: no error for shadowing a script function.
Solution:   Check for already defined items. (closes #6652)
2020-08-07 22:00:26 +02:00
Bram Moolenaar
1c199f9c70 patch 8.2.1390: Vim9: type error after storing an option value
Problem:    Vim9: type error after storing an option value.
Solution:   Drop the type after a STOREOPT instruction. (closes #6632)
2020-08-07 21:28:34 +02:00
Bram Moolenaar
dd29f1b056 patch 8.2.1388: Vim9: += only works for numbers
Problem:    Vim9: += only works for numbers.
Solution:   Use += as concatenate for a list. (closes #6646)
2020-08-07 20:46:20 +02:00
Bram Moolenaar
c5da1fb7ea patch 8.2.1375: Vim9: method name with digit not accepted
Problem:    Vim9: method name with digit not accepted.
Solution:   Use eval_isnamec() instead of eval_isnamec1(). (closes #6613)
2020-08-05 15:43:44 +02:00
Bram Moolenaar
a71e263320 patch 8.2.1374: Vim9: error for assigning empty list to script variable
Problem:    Vim9: error for assigning empty list to script variable.
Solution:   Use t_unknown for empty list member. (closes #6595)
2020-08-05 15:11:03 +02:00
Bram Moolenaar
f9b2b49663 patch 8.2.1373: Vim9: no error for assigning to non-existing script var
Problem:    Vim9: no error for assigning to non-existing script var.
Solution:   Check that in Vim9 script the variable was defined. (closes #6630)
2020-08-05 14:34:14 +02:00
Bram Moolenaar
bb1b5e24ec patch 8.2.1365: Vim9: no error for missing white space around operator
Problem:    Vim9: no error for missing white space around operator.
Solution:   Check for white space. (closes #6618)
2020-08-05 10:53:21 +02:00
Bram Moolenaar
658217276f patch 8.2.1357: Vim9: cannot assign to / register
Problem:    Vim9: cannot assign to / register.
Solution:   Adjust check for assignment.
2020-08-02 18:58:54 +02:00
Bram Moolenaar
7226e5b19b patch 8.2.1356: Vim9: cannot get the percent register
Problem:    Vim9: cannot get the percent register.
Solution:   Check for readable registers instead of writable. (closes #6566)
2020-08-02 17:33:26 +02:00
Bram Moolenaar
c2ee44cc38 patch 8.2.1355: Vim9: no error using :let for options and registers
Problem:    Vim9: no error using :let for options and registers.
Solution:   Give an error. (closes #6568)
2020-08-02 16:59:00 +02:00
Bram Moolenaar
ad486a0f0d patch 8.2.1352: Vim9: no error for shadowing a script-local function
Problem:    Vim9: no error for shadowing a script-local function by a nested
            function.
Solution:   Check for script-local function. (closes #6586)
2020-08-01 23:22:18 +02:00
Bram Moolenaar
bcbf41395f patch 8.2.1351: Vim9: no proper error if using namespace for nested function
Problem:    Vim9: no proper error if using namespace for nested function.
Solution:   Specifically check for a namespace. (closes #6582)
2020-08-01 22:35:13 +02:00
Bram Moolenaar
eef2102e20 patch 8.2.1349: Vim9: can define a function with the name of an import
Problem:    Vim9: can define a function with the name of an import.
Solution:   Disallow using an existing name. (closes #6585)
2020-08-01 22:16:43 +02:00
Bram Moolenaar
f5a48010ef patch 8.2.1342: Vim9: accidentally using "t" gives a confusing error
Problem:    Vim9: accidentally using "x" gives a confusing error.
Solution:   Disallow using ":t" in Vim9 script. (issue #6399)
2020-08-01 17:00:03 +02:00
Bram Moolenaar
2caa1594e7 patch 8.2.1339: Vim9: assigning to global dict variable doesn't work
Problem:    Vim9: assigning to global dict variable doesn't work.
Solution:   Guess variable type based in index type. (issue #6591)
2020-08-01 15:53:19 +02:00
Bram Moolenaar
8e4c8c853e patch 8.2.1338: Vim9: assigning to script-local variable doesn't check type
Problem:    Vim9: assigning to script-local variable doesn't check type.
Solution:   Use the type. (issue #6591)
2020-08-01 15:38:38 +02:00
Bram Moolenaar
ce6583568f patch 8.2.1332: Vim9: memory leak when using nested global function
Problem:    Vim9: memory leak when using nested global function.
Solution:   Delete the function when deleting the instruction.  Disable test
            that still causes a leak.
2020-07-31 23:47:12 +02:00
Bram Moolenaar
badd8486f7 patch 8.2.1331: Vim9: :echo with two lists doesn't work
Problem:    Vim9: :echo with two lists doesn't work.
Solution:   Do not skip white space before []. (closes #6552)
2020-07-31 22:38:17 +02:00
Bram Moolenaar
38ddf333f6 patch 8.2.1329: Vim9: cannot define global function inside :def function
Problem:    Vim9: cannot define global function inside :def function.
Solution:   Assign to global variable instead of local. (closes #6584)
2020-07-31 22:05:04 +02:00
Bram Moolenaar
696ba23149 patch 8.2.1323: Vim9: invalid operators only rejected in :def function
Problem:    Vim9: invalid operators only rejected in :def function.
Solution:   Also reject them at script level. (closes #6564)
2020-07-29 21:20:41 +02:00
Bram Moolenaar
33afa2447b patch 8.2.1320: Vim9: cannot declare some single letter variables
Problem:    Vim9: cannot declare some single letter variables.
Solution:   Do not recognize a colon for a namespace for single letter
            variables. (closes #6547)
2020-07-29 19:18:00 +02:00
Bram Moolenaar
ae616494d7 patch 8.2.1308: Vim9: accidentally using "x" causes Vim to exit
Problem:    Vim9: accidentally using "x" causes Vim to exit.
Solution:   Disallow using ":x" or "xit" in Vim9 script. (closes #6399)
2020-07-28 20:07:27 +02:00
Bram Moolenaar
b13ab99908 patch 8.2.1306: checking for first character of dict key is inconsistent
Problem:    Checking for first character of dict key is inconsistent.
Solution:   Add eval_isdictc(). (closes #6546)
2020-07-27 21:43:28 +02:00
Bram Moolenaar
01865ade85 patch 8.2.1302: Vim9: varargs arg after optional arg does not work
Problem:    Vim9: varargs arg after optional arg does not work
Solution:   Check for the "..." first. (issue #6507)
2020-07-26 18:33:09 +02:00
Bram Moolenaar
ace6132aa8 patch 8.2.1301: Vim9: varargs argument type not parsed properly
Problem:    Vim9: varargs argument type not parsed properly.
Solution:   Skip over the "...". (issue #6507)
2020-07-26 18:16:58 +02:00
Bram Moolenaar
4fc224ca1c patch 8.2.1300: Vim9: optional argument type not parsed properly
Problem:    Vim9: optional argument type not parsed properly.
Solution:   Skip over the "?". (issue #6507)
2020-07-26 17:56:25 +02:00
Bram Moolenaar
2d6b20d6a9 patch 8.2.1293: Vim9: error when using vim9script in TextYankPost
Problem:    Vim9: error when using vim9script in TextYankPost.
Solution:   Use EX_LOCKOK instead of the EX_CMDWIN flag for command that can
            be used when text is locked. (closes #6529)
2020-07-25 19:30:59 +02:00
Bram Moolenaar
40f4f7a48c patch 8.2.1287: Vim9: crash when using an imported function
Problem:    Vim9: crash when using an imported function.
Solution:   Add the function type to the imported entry. (closes #6522)
2020-07-23 22:41:43 +02:00
Bram Moolenaar
b8070e3173 patch 8.2.1285: Vim9: argument types are not checked on assignment
Problem:    Vim9: argument types are not checked on assignment.
Solution:   Check function argument types. (issue #6507)
2020-07-23 20:56:04 +02:00
Bram Moolenaar
bfba8651a5 patch 8.2.1284: Vim9: skipping over type includes following white space
Problem:    Vim9: skipping over type includes following white space, leading
            to an error for missing white space.
Solution:   Do not skip over white space after the type.
2020-07-23 20:09:10 +02:00
Bram Moolenaar
637cd7d1c9 patch 8.2.1283: Vim9: error for misplaced -> lacks argument
Problem:    Vim9: error for misplaced -> lacks argument.
Solution:   Use the pointer before it was advanced.
2020-07-23 19:06:23 +02:00
Bram Moolenaar
6c4bfe4b31 patch 8.2.1282: Vim9: crash when using CheckScriptFailure()
Problem:    Vim9: crash when using CheckScriptFailure() in
            Test_vim9script_call_fail_decl().
Solution:   Do not decrement the def_functions len unless the function was
            newly added.
2020-07-23 18:26:30 +02:00
Bram Moolenaar
dd1a9af00f patch 8.2.1278: Vim9: line break after "->" only allowed in :def function
Problem:    Vim9: line break after "->" only allowed in :def function.
Solution:   Only allow line break after "->". (closes #6492)
2020-07-23 15:38:03 +02:00
Bram Moolenaar
4cdb13ce81 patch 8.2.1272: Vim9: type not checked if declaration also assigns value
Problem:    Vim9: type not checked if declaration also assigns value.
Solution:   Check the type. (issue #6507)
2020-07-22 21:45:14 +02:00
Bram Moolenaar
0f60e80f9b patch 8.2.1271: Vim9: Error for Funcref function argument type
Problem:    Vim9: Error for Funcref function argument type.
Solution:   Find the actual function type if possible. (issue #6507)
2020-07-22 20:16:11 +02:00
Bram Moolenaar
2f1980f7b7 patch 8.2.1270: Vim9: not skipping over function type declaration
Problem:    Vim9: not skipping over function type declaration with only a
            return type.
Solution:   Skip over the return type. (issue #6507)
2020-07-22 19:30:06 +02:00
Bram Moolenaar
c7db57788b patch 8.2.1261: Vim9: common type of function not tested
Problem:    Vim9: common type of function not tested.
Solution:   Add a test.  Fix uncovered problems.
2020-07-21 20:55:50 +02:00