Bram Moolenaar
ea2d407f9c
patch 8.2.1977: Vim9: error for using a string in a condition is confusing
...
Problem: Vim9: error for using a string in a condition is confusing.
Solution: Give a more specific error. Also adjust the compile time type
checking for || and &&.
2020-11-12 12:08:51 +01:00
Bram Moolenaar
631e8f9345
patch 8.2.1953: Vim9: extra "unknown" error after other error
...
Problem: Vim9: extra "unknown" error after other error.
Solution: Restore did_emsg count after EXEC instruction. (closes #7254 )
Improve error message from assert_fails()
2020-11-04 15:07:16 +01:00
Bram Moolenaar
c7f7f6db3e
patch 8.2.1952: Vim9: crash when using a NULL dict key
...
Problem: Vim9: crash when using a NULL dict key.
Solution: Use a NULL dict key like an empty string. (closes #7249 )
2020-11-04 13:38:28 +01:00
Bram Moolenaar
cd030c4b60
patch 8.2.1928: Vim9: "silent!" not effective when list index is wrong
...
Problem: Vim9: "silent!" not effective when list index is wrong.
Solution: Ignore list indes failure when emsg_silent is set. (closes #7232 )
2020-10-30 21:49:40 +01:00
Bram Moolenaar
d66960bf57
patch 8.2.1927: Vim9: get unknown error with an error in a timer function
...
Problem: Vim9: get unknown error with an error in a timer function.
Solution: Use did_emsg instead of called_emsg. (closes #7231 )
2020-10-30 20:46:26 +01:00
Bram Moolenaar
086fc9a585
patch 8.2.1924: Vim9: crash when indexing dict with NULL key
...
Problem: Vim9: crash when indexing dict with NULL key.
Solution: Use empty string instead of NULL. (closes #7229 ) Make error
message more useful for empty string.
2020-10-30 18:33:02 +01:00
Bram Moolenaar
28ee892ac4
patch 8.2.1919: assert_fails() setting emsg_silent changes normal execution
...
Problem: Assert_fails() setting emsg_silent changes normal execution.
Solution: Use a separate flag in_assert_fails.
2020-10-28 20:20:00 +01:00
Bram Moolenaar
171fb923b8
patch 8.2.1916: Vim9: function call is aborted even when "silent!" is used
...
Problem: Vim9: function call is aborted even when "silent!" is used.
Solution: Use did_emsg instead of called_emsg. (closes #7213 )
2020-10-28 16:54:47 +01:00
Bram Moolenaar
a360dbe3b6
patch 8.2.1906: warning for signed/unsigned
...
Problem: Warning for signed/unsigned.
Solution: Use size_t instead of int. (Mike Williams)
2020-10-26 18:46:53 +01:00
Bram Moolenaar
02194d2bd5
patch 8.2.1900: Vim9: command modifiers do not work
...
Problem: Vim9: command modifiers do not work.
Solution: Make most command modifiers work.
2020-10-24 23:08:38 +02:00
Bram Moolenaar
f4c6e1e75c
patch 8.2.1894: Vim9: command modifiers are not supported
...
Problem: Vim9: command modifiers are not supported.
Solution: Support "silent" and "silent!".
2020-10-23 18:02:32 +02:00
Bram Moolenaar
955347cc7e
patch 8.2.1869: Vim9: memory leak when using add()
...
Problem: Vim9: memory leak when using add().
Solution: Free the added item.
2020-10-19 23:01:46 +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
335e671322
patch 8.2.1860: Vim9: memory leak when throwing empty string
...
Problem: Vim9: memory leak when throwing empty string.
Solution: Free the empty string.
2020-10-17 22:58:21 +02:00
Bram Moolenaar
352134bbfb
patch 8.2.1859: Vim9: crash in unpack assignment
...
Problem: Vim9: crash in unpack assignment.
Solution: Make sure an error message is turned into an exception.
(closes #7159 )
2020-10-17 22:04:08 +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
1e021e63c5
patch 8.2.1854: Vim9: crash when throwing exception for NULL string
...
Problem: Vim9: crash when throwing exception for NULL string. (Dhiraj
Mishra)
Solution: Handle NULL string like empty string. (closes #7139 )
2020-10-16 20:25:23 +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
85d5e2b723
patch 8.2.1819: Vim9: Memory leak when using a closure
...
Problem: Vim9: Memory leak when using a closure.
Solution: Compute the mininal refcount in the funcstack. Reenable disabled
tests.
2020-10-10 14:13:01 +02:00
Bram Moolenaar
0876c78527
patch 8.2.1812: Vim9: nested closure throws an internal error
...
Problem: Vim9: nested closure throws an internal error.
Solution: Do not skip a local variable with a partial. (closes #7065 )
2020-10-07 19:08:04 +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
5366e1aecf
patch 8.2.1778: Vim9: returning from a partial call clears outer context
...
Problem: Vim9: returning from a partial call clears outer context, causing
a crash.
Solution: Put the outer context in the stack frame. (closes #7044 )
2020-10-01 13:01:34 +02:00
Bram Moolenaar
c70bdab0b8
patch 8.2.1749: Vim9: crash when closure fails in nested function
...
Problem: Vim9: crash when closure fails in nested function.
Solution: Handle function returns before dereferencing remaining closures.
(closes #7008 )
2020-09-26 19:59:38 +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
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
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
dec07510bb
patch 8.2.1709: Vim9: memory leak when using multiple closures
...
Problem: Vim9: memory leak when using multiple closures.
Solution: Free the partial.
2020-09-18 23:11:10 +02:00
Bram Moolenaar
7cbfaa51de
patch 8.2.1706: Vim9: crash after running into the "Multiple closures" error
...
Problem: Vim9: crash after running into the "Multiple closures" error.
Solution: When a function fails still update any closures. (closes #6973 )
2020-09-18 21:25:32 +02:00
Bram Moolenaar
77e5dcc36a
patch 8.2.1704: Vim9: crash in for loop when autoload script has an error
...
Problem: Vim9: crash in for loop when autoload script has an error.
Solution: Reset suppress_errthrow. Check for NULL list. (closes #6967 )
2020-09-17 21:29:03 +02:00
Bram Moolenaar
9939f57b7f
patch 8.2.1700: Vim9: try/catch causes wrong value to be returned
...
Problem: Vim9: try/catch causes wrong value to be returned.
Solution: Reset tcd_return. (closes #6964 )
2020-09-16 22:29:52 +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
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
eb26f4331f
patch 8.2.1680: Vim9: line number for compare error is wrong
...
Problem: Vim9: line number for compare error is wrong.
Solution: Set SOURCING_LNUM. (closes #6936 )
2020-09-14 16:50:05 +02:00
Bram Moolenaar
dadaddd59f
patch 8.2.1668: Vim9: not accepting 0 or 1 as bool when type is any
...
Problem: Vim9: not accepting 0 or 1 as bool when type is any.
Solution: Convert the type with the CHECKTYPE instruction. (closes #6913 )
2020-09-12 19:11:23 +02:00
Bram Moolenaar
dfa3d5524e
patch 8.2.1656: Vim9: callstack wrong if :def function calls :def function
...
Problem: Vim9: callstack wrong if :def function calls :def function.
Solution: Set the line number before calling. (closes #6914 )
2020-09-10 22:05:08 +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
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
Bram Moolenaar
95006e3dca
patch 8.2.1541: Vim9: cannot find function reference for s:Func
...
Problem: Vim9: cannot find function reference for s:Func.
Solution: Recognize <SNR> prefix. (closes #6805 )
2020-08-29 17:47:08 +02:00
Bram Moolenaar
ee8580e52e
patch 8.2.1534: Vim9: type error for argument type is not at call position
...
Problem: Vim9: type error for argument type is not at call position.
Solution: Set the context and stack after checking the arguments.
(issue #6785 )
2020-08-28 17:19:07 +02:00
Bram Moolenaar
430deb1945
patch 8.2.1516: Vim9: error for :exe has wrong line number
...
Problem: Vim9: error for :exe has wrong line number.
Solution: Set line number before calling do_cmdline_cmd(). (closes #6774 )
2020-08-23 16:29:11 +02:00
Bram Moolenaar
3affe7a6c6
patch 8.2.1481: Vim9: line number reported with error may be wrong
...
Problem: Vim9: line number reported with error may be wrong.
Solution: Check line number in tests.
2020-08-18 20:34:13 +02:00
Bram Moolenaar
1d634542cf
patch 8.2.1479: Vim9: error for list index uses wrong line number
...
Problem: Vim9: error for list index uses wrong line number.
Solution: Set source line number. (closes #6724 ) Add a way to assert the
line number of the error with assert_fails().
2020-08-18 13:41:50 +02:00
Bram Moolenaar
e5abf7af08
patch 8.2.1467: Vim9: :echomsg doesn't like a dict argument
...
Problem: Vim9: :echomsg doesn't like a dict argument.
Solution: Convert arguments like in legacy script. (closes #6717 )
2020-08-16 18:29:35 +02:00
Bram Moolenaar
cc673e746a
patch 8.2.1466: Vim9: cannot index or slice a variable with type "any"
...
Problem: Vim9: cannot index or slice a variable with type "any".
Solution: Add runtime index and slice.
2020-08-16 17:33:35 +02:00
Bram Moolenaar
56acb0943e
patch 8.2.1465: Vim9: subscript not handled properly
...
Problem: Vim9: subscript not handled properly.
Solution: Adjust error message. Remove dead code. Disallow string to
number conversion in scripts.
2020-08-16 14:48:19 +02:00
Bram Moolenaar
829ac868b7
patch 8.2.1464: Vim9: build warning for unused variable
...
Problem: Vim9: build warning for unused variable.
Solution: Delete the variable declaration.
2020-08-15 22:48:48 +02:00
Bram Moolenaar
ed5918771f
patch 8.2.1463: Vim9: list slice not supported yet
...
Problem: Vim9: list slice not supported yet.
Solution: Add support for list slicing.
2020-08-15 22:14:53 +02:00