Bram Moolenaar
a1224cb706
patch 8.2.1884: compiler warning for uninitialized variable
...
Problem: Compiler warning for uninitialized variable. (John Marriott)
Solution: Initialize with NULL.
2020-10-22 12:31:49 +02:00
Bram Moolenaar
c58f5456e5
patch 8.2.1882: Vim9: v:disallow_let is no longer needed
...
Problem: Vim9: v:disallow_let is no longer needed.
Solution: Remove v:disallow_let.
2020-10-21 20:58:52 +02:00
Bram Moolenaar
af7a9066a9
patch 8.2.1880: Vim9: asan complains about adding zero to NULL
...
Problem: Vim9: Asan complains about adding zero to NULL.
Solution: Check for argument count first.
2020-10-21 16:49:17 +02:00
Bram Moolenaar
ca17453e73
patch 8.2.1879: Vim9: argument types of insert() not checked when compiling
...
Problem: Vim9: argument types of insert() not checked when compiling.
Solution: Add argument type checks for insert().
2020-10-21 16:42:22 +02:00
Bram Moolenaar
94738d8fab
patch 8.2.1876: Vim9: argument types are not checked at compile time
...
Problem: Vim9: argument types for builtin functions are not checked at
compile time.
Solution: Add an argument type checking mechanism. Implement type checks for
one function.
2020-10-21 14:25:07 +02:00
Bram Moolenaar
9a13e185e5
patch 8.2.1868: Vim9: no error for missing space after comma in dict
...
Problem: Vim9: no error for missing space after comma in dict.
Solution: Check for white space. (closes #6672 )
2020-10-19 21:45:07 +02:00
Bram Moolenaar
80b0e5ea11
patch 8.2.1867: Vim9: argument to add() not checked for blob
...
Problem: Vim9: argument to add() not checked for blob.
Solution: Add the BLOBAPPEND instruction.
2020-10-19 20:45:36 +02:00
Bram Moolenaar
1dcae59957
patch 8.2.1865: Vim9: add() does not check type of argument
...
Problem: Vim9: add() does not check type of argument.
Solution: Inline the add() call. (closes #7160 )
2020-10-19 19:02:42 +02:00
Bram Moolenaar
334a8b4bde
patch 8.2.1864: Vim9: no error for wrong list type
...
Problem: Vim9: no error for wrong list type.
Solution: Add flag to indicate a constant. (closes #7160 )
2020-10-19 16:07:42 +02:00
Bram Moolenaar
2ea79ad835
patch 8.2.1862: vim9: memory leak when compiling lambda fails
...
Problem: vim9: memory leak when compiling lambda fails.
Solution: Call clear_evalarg().
2020-10-18 23:32:13 +02:00
Bram Moolenaar
e13bdec6b9
patch 8.2.1855: Vim9: get error message when nothing is wrong
...
Problem: Vim9: get error message when nothing is wrong.
Solution: Check called_emsg instead of did_emsg. (closes #7143 )
2020-10-16 23:16:47 +02:00
Bram Moolenaar
27491cd3ef
patch 8.2.1851: Vim9: "!" followed by space incorrectly used
...
Problem: Vim9: "!" followed by space incorrectly used.
Solution: Skip over trailing spaces. (closes #7131 )
2020-10-15 21:54:56 +02:00
Bram Moolenaar
209f0208f7
patch 8.2.1847: Vim9: using negative value for unsigned type
...
Problem: Vim9: using negative value for unsigned type.
Solution: Use zero instead of -1.
2020-10-15 13:57:56 +02:00
Bram Moolenaar
fbbcd00367
patch 8.2.1846: Vim9: block variables are not found in compiled function
...
Problem: Vim9: variables declared in a local block are not found in
when a function is compiled.
Solution: Look for script variables in sn_all_vars.
2020-10-15 12:46:44 +02:00
Bram Moolenaar
f4e8cdd3d2
patch 8.2.1840: Vim9: error message is not clear about compilation error
...
Problem: Vim9: error message is not clear about compilation error.
Solution: Say "compiling" instead of "processing".
2020-10-12 22:07:13 +02:00
Bram Moolenaar
e8211a33dc
patch 8.2.1817: Vim9: wrong instruction when reusing a local variable spot
...
Problem: Vim9: wrong instruction when reusing a local variable spot.
Solution: Clear a newly allocated local variable. (closes #7080 )
2020-10-09 22:04:29 +02:00
Bram Moolenaar
44aefffaad
patch 8.2.1802: Vim9: crash with unterminated dict
...
Problem: Vim9: crash with unterminated dict. (Dhiraj Mishra)
Solution: Return empty string instead of NULL. (closes #7084 )
2020-10-05 19:23:59 +02:00
Bram Moolenaar
dda749ce85
patch 8.2.1800: Vim9: memory leak if "if" condition is invalid
...
Problem: Vim9: memory leak if "if" condition is invalid.
Solution: Free ppconst earlier.
2020-10-04 17:24:29 +02:00
Bram Moolenaar
1310660557
patch 8.2.1798: Vim9: trinary operator condition is too permissive
...
Problem: Vim9: trinary operator condition is too permissive.
Solution: Use tv_get_bool_chk().
2020-10-04 16:06:05 +02:00
Bram Moolenaar
2bb2658bef
patch 8.2.1795: Vim9: operators && and || have a confusing result
...
Problem: Vim9: operators && and || have a confusing result.
Solution: Make the result a boolean.
2020-10-03 22:52:39 +02:00
Bram Moolenaar
92f26c256e
patch 8.2.1794: no falsy Coalescing operator
...
Problem: No falsy Coalescing operator.
Solution: Add the "??" operator. Fix mistake with function argument count.
2020-10-03 20:17:30 +02:00
Bram Moolenaar
c1f0066b64
patch 8.2.1789: Vim9: crash with invalid list constant
...
Problem: Vim9: crash with invalid list constant. (Dhiraj Mishra)
Solution: Return FAIL when compiling the list fails. (closes #7066 )
2020-10-03 13:41:53 +02:00
Bram Moolenaar
06f9c6940a
patch 8.2.1764: Vim9: no error when assigning to script var with wrong type
...
Problem: Vim9: no error when assigning to script var with wrong type.
Solution: Fix off-by-one error. (closes #7028 )
2020-09-27 21:27:40 +02:00
Bram Moolenaar
2914a20abc
patch 8.2.1760: Vim9: crash when end marker is missing
...
Problem: Vim9: crash when end marker is missing. (Dhiraj Mishra)
Solution: Check for end of function lines. (closes #7031 )
2020-09-27 18:24:03 +02:00
Bram Moolenaar
cfcd011fcd
patch 8.2.1756: Vim9: :let will soon be disallowed
...
Problem: Vim9: :let will soon be disallowed.
Solution: Add v:disallow_let temporarily. Fix tests.
2020-09-27 15:19:27 +02:00
Bram Moolenaar
c0e29010f6
patch 8.2.1755: Vim9: crash when using invalid heredoc marker
...
Problem: Vim9: crash when using invalid heredoc marker. (Dhiraj Mishra)
Solution: Check for NULL list. (closes #7027 ) Fix comment character.
2020-09-27 14:22:48 +02:00
Bram Moolenaar
30fd8204ce
patch 8.2.1744: Vim9: using ":const!" is weird
...
Problem: Vim9: using ":const!" is weird.
Solution: Use "var" - "final" - "const" like Dart. "let" still works for
now.
2020-09-26 15:09:30 +02:00
Bram Moolenaar
9c4f55204f
patch 8.2.1739: Vim9: crash when compiling a manually defined function
...
Problem: Vim9: crash when compiling a manually defined function. (Antony
Scriven)
Solution: Check that the script ID is positive. (closes #7012 )
2020-09-25 21:47:28 +02:00
Bram Moolenaar
148ce7ae62
patch 8.2.1734: Vim9: cannot use a funcref for a closure twice
...
Problem: Vim9: cannot use a funcref for a closure twice.
Solution: Instead of putting the funcref on the stack use a growarray on the
execution context.
2020-09-23 21:57:23 +02:00
Bram Moolenaar
4ee711f213
patch 8.2.1733: Vim9: memory leaks when using nested function
...
Problem: Vim9: memory leaks when using nested function.
Solution: Free function when compilation fails.
2020-09-23 18:51:11 +02:00
Bram Moolenaar
04bdd573d0
patch 8.2.1730: Vim9: cannot use member of unknown type
...
Problem: Vim9: cannot use member of unknown type.
Solution: When type is unknown us "any". (closes #6997 )
2020-09-23 13:25:32 +02:00
Bram Moolenaar
078269bdce
patch 8.2.1720: Vim9: memory leak with heredoc that isn't executed
...
Problem: Vim9: memory leak with heredoc that isn't executed. (Dominique
Pellé)
Solution: Don't clear the list items. (closes #6991 )
2020-09-21 20:35:55 +02:00
Bram Moolenaar
10e4f12bf4
patch 8.2.1719: Vim9: no error if comma is missing in between arguments
...
Problem: Vim9: no error if comma is missing in between arguments.
Solution: Give an error message.
2020-09-20 22:43:52 +02:00
Bram Moolenaar
a05e524f3a
patch 8.2.1712: Vim9: leaking memory when calling a lambda
...
Problem: Vim9: leaking memory when calling a lambda.
Solution: Decrement function reference from ISN_DCALL.
2020-09-19 18:19:19 +02:00
Bram Moolenaar
fdeab65db6
patch 8.2.1711: Vim9: leaking memory when using partial
...
Problem: Vim9: leaking memory when using partial.
Solution: Do delete the function even when it was compiled.
2020-09-19 15:16:50 +02:00
Bram Moolenaar
b185a40745
patch 8.2.1708: Vim9: error message for function has unpritable characters
...
Problem: Vim9: error message for function has unpritable characters.
Solution: use printable_func_name(). (closes #6965 )
2020-09-18 22:42:00 +02:00
Bram Moolenaar
2f8cbc4b22
patch 8.2.1695: Vim9: crash when using varargs type "any"
...
Problem: Vim9: crash when using varargs type "any".
Solution: Check if uf_va_type is &t_any. (closes #6957 )
2020-09-16 17:22:59 +02:00
Bram Moolenaar
5e65423077
patch 8.2.1691: Vim9: list<any> is not accepted where list<number> is expected
...
Problem: Vim9: list<any> is not accepted where list<number> is expected.
Solution: Add functions to allocate and free a type_T, use it in
ISN_CHECKTYPE. (closes #6959 )
2020-09-16 15:22:00 +02:00
Bram Moolenaar
9b123d8590
patch 8.2.1687: Vim9: out of bounds error
...
Problem: Vim9: out of bounds error.
Solution: Check that cmdidx is not negative.
2020-09-14 22:39:11 +02:00
Bram Moolenaar
71abe48289
patch 8.2.1686: Vim9: "const!" not sufficiently tested
...
Problem: Vim9: "const!" not sufficiently tested.
Solution: Add a few more test cases. Fix type checking.
2020-09-14 22:28:30 +02:00
Bram Moolenaar
0b4c66c67a
patch 8.2.1685: Vim9: cannot declare a constant value
...
Problem: Vim9: cannot declare a constant value.
Solution: Introduce ":const!".
2020-09-14 21:39:44 +02:00
Bram Moolenaar
dbeecb2b6b
patch 8.2.1682: Vim9: const works in an unexpected way
...
Problem: Vim9: const works in an unexpected way.
Solution: ":const" only disallows changing the variable, not the value.
Make "list[0] = 9" work at the script level.
2020-09-14 18:15:09 +02:00
Bram Moolenaar
3bd8de40b4
patch 8.2.1679: Vim9: ":*" is not recognized as a range
...
Problem: Vim9: ":*" is not recognized as a range.
Solution: Move recognizing "*" into skip_range(). (closes #6838 )
2020-09-14 16:37:34 +02:00
Bram Moolenaar
0f769815c8
patch 8.2.1667: local function name cannot shadow a global function name
...
Problem: Local function name cannot shadow a global function name.
Solution: Ignore global functions when checking a script-local or scoped
function name. (closes #6926 )
2020-09-12 18:32:34 +02:00
Bram Moolenaar
8b848cafb0
patch 8.2.1657: Vim9: no proper error for nested ":def!"
...
Problem: Vim9: no proper error for nested ":def!".
Solution: Check for "!". (closes #6920 )
2020-09-10 22:28:01 +02:00
Bram Moolenaar
4ed124cc6c
patch 8.2.1647: Vim9: result of expression with && and || is not a bool
...
Problem: Vim9: result of expression with && and || cannot be assigned to a
bool variable.
Solution: Add the TTFLAG_BOOL_OK flag and convert the value if needed.
2020-09-09 20:03:46 +02:00
Bram Moolenaar
29a86ffee7
patch 8.2.1641: Vim9: cannot use 0 or 1 where a bool is expected
...
Problem: Vim9: cannot use 0 or 1 where a bool is expected.
Solution: Allow using 0 and 1 for a bool type. (closes #6903 )
2020-09-09 14:55:31 +02:00
Bram Moolenaar
c3516f7e45
patch 8.2.1637: Vim9: :put ={expr} does not work inside :def function
...
Problem: Vim9: :put ={expr} does not work inside :def function.
Solution: Add ISN_PUT. (closes #6397 )
2020-09-08 22:45:35 +02:00
Bram Moolenaar
9c2b06637b
patch 8.2.1560: using NULL pointers in some code
...
Problem: Using NULL pointers in some code. (James McCoy)
Solution: Avoid adding to a NULL pointer. Use byte as unsigned.
2020-09-01 19:56:15 +02:00
Bram Moolenaar
8b565c2c15
patch 8.2.1551: Vim9: error for argument type does not mention the number
...
Problem: Vim9: error for argument type does not mention the number.
Solution: Pass the argument number to where the error is given.
2020-08-30 23:24:20 +02:00