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
a2c026d0fd
patch 8.2.1861: Vim9: no specific error when parsing lambda fails
...
Problem: Vim9: no specific error when parsing lambda fails.
Solution: Also give syntax errors when not evaluating. (closes #7154 )
2020-10-18 18:03:17 +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
93be1644db
patch 8.2.1838: Vim9: cannot insert a comment line in an expression
...
Problem: Vim9: cannot insert a comment line in an expression.
Solution: Skip comment lines at the script level. (closes #7111 )
2020-10-11 21:34:41 +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
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
7a9cbca00a
patch 8.2.1766: Vim9: Some tests are still using :let
...
Problem: Vim9: Some tests are still using :let.
Solution: Change the last few declarations to use :var.
2020-09-27 22:47:05 +02:00
Bram Moolenaar
9830938e77
patch 8.2.1765: Vim9: some tests use "var var"
...
Problem: Vim9: some tests use "var var".
Solution: Use "var name". (closes #7032 )
2020-09-27 21:58:45 +02:00
Bram Moolenaar
37ce6d3a6a
patch 8.2.1759: Vim9: Some tests are still using :let
...
Problem: Vim9: Some tests are still using :let.
Solution: Change more declarations to use :var.
2020-09-27 17:57:43 +02:00
Bram Moolenaar
5597ba0467
patch 8.2.1758: Vim9: type of unmaterialized list is wrong
...
Problem: Vim9: type of unmaterialized list is wrong.
Solution: Use list<number>.
2020-09-27 17:45:03 +02:00
Bram Moolenaar
971caf53b8
patch 8.2.1724: Vim9: assignment tests spread out
...
Problem: Vim9: assignment tests spread out.
Solution: Create new test file for assignment tests.
2020-09-21 22:21:42 +02:00
Bram Moolenaar
dbd759309b
patch 8.2.1722: Vim9: cannot assign a lambda to a variable of type function
...
Problem: Vim9: cannot assign a lambda to a variable of type function.
Solution: Allow for assigning a partial to a variable of type function.
(Naruhiko Nishino, closes #6996 )
2020-09-21 21:48:21 +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
77b20977dc
patch 8.2.1710: Vim9: list of list type can be wrong
...
Problem: Vim9: list of list type can be wrong.
Solution: Use VAR_UNKNOWN for empty list. Recognize VAR_UNKNOWN when
looking for a common type. (closes #6979 )
2020-09-19 14:12:34 +02:00
Bram Moolenaar
7707228aac
patch 8.2.1697: inconsistent capitalization of error messages
...
Problem: Inconsistent capitalization of error messages.
Solution: Always start with a capital.
2020-09-16 17:55:40 +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
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
c6e57b74fa
patch 8.2.1671: Vim9: stray error for missing white space
...
Problem: Vim9: stray error for missing white space.
Solution: Do not skip over white space after member. (closes #6817 )
2020-09-12 21:27:03 +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
ba7c0d7b4c
patch 8.2.1644: Vim9: cannot assign 1 and 0 to bool at script level
...
Problem: Vim9: cannot assign 1 and 0 to bool at script level.
Solution: Add the TTFLAG_BOOL_OK flag to the type. Fix name of test
function.
2020-09-09 18:54:42 +02:00
Bram Moolenaar
d2c617055a
patch 8.2.1623: Vim9: using :call where it is not needed
...
Problem: Vim9: using :call where it is not needed.
Solution: Remove :call. (closes #6892 )
2020-09-06 15:58:36 +02:00
Bram Moolenaar
7918238528
patch 8.2.1609: Vim9: test fails when build without +channel
...
Problem: Vim9: test fails when build without +channel.
Solution: Add check for +channel. (closes #6879 )
2020-09-05 20:06:33 +02:00
Bram Moolenaar
749639ec72
patch 8.2.1529: Vim9: :elseif may be compiled when not needed
...
Problem: Vim9: :elseif may be compiled when not needed.
Solution: Do evaluate the :elseif expression.
2020-08-27 23:08:47 +02:00
Bram Moolenaar
601e76ac3c
patch 8.2.1527: Vim9: cannot use a function name at script level
...
Problem: Vim9: cannot use a function name as a function reference at script
level.
Solution: Check if a name is a function name. (closes #6789 )
2020-08-27 21:33:10 +02:00
Bram Moolenaar
69e44552c5
patch 8.2.1512: failure after trinary expression fails
...
Problem: Failure after trinary expression fails.
Solution: Restore eval_flags. (Yasuhiro Matsumoto, closes #6776 )
2020-08-22 22:37:20 +02:00
Bram Moolenaar
7cb6fc29d0
patch 8.2.1504: Vim9: white space checks are only done for a :def function
...
Problem: Vim9: white space checks are only done for a :def function.
Solution: Also do checks at the script level. Adjust the name of a few
error messages.
2020-08-21 22:36:47 +02:00
Bram Moolenaar
122616d9c1
patch 8.2.1502: Vim9: can use += with a :let command at script level
...
Problem: Vim9: can use += with a :let command at script level.
Solution: Give an error.
2020-08-21 21:32:50 +02:00
Bram Moolenaar
3fc71285d5
patch 8.2.1501: Vim9: concatenating to constant reverses order
...
Problem: Vim9: concatenating to constant reverses order.
Solution: Generate constant before option, register and environment
variable. (closes #6757 )
2020-08-21 20:43:17 +02:00
Bram Moolenaar
aeb2bdd0de
patch 8.2.1482: Vim9: crash when using a nested lambda
...
Problem: Vim9: crash when using a nested lambda.
Solution: Do not clear the growarray when not evaluating. Correct pointer
when getting the next line. (closes #6731 )
2020-08-18 22:32:03 +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
f923571ec1
patch 8.2.1468: Vim9: invalid error for missing white space
...
Problem: Vim9: invalid error for missing white space.
Solution: Don't skip over white space after index. (closes #6718 )
2020-08-16 18:42:53 +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
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
Bram Moolenaar
11107bab7e
patch 8.2.1462: Vim9: string slice not supported yet
...
Problem: Vim9: string slice not supported yet.
Solution: Add support for string slicing.
2020-08-15 21:10:16 +02:00
Bram Moolenaar
e3c37d8ebf
patch 8.2.1461: Vim9: string indexes are counted in bytes
...
Problem: Vim9: string indexes are counted in bytes.
Solution: Use character indexes. (closes #6574 )
2020-08-15 18:39:05 +02:00
Bram Moolenaar
451c2e3536
patch 8.2.1460: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move more messages into errors.h.
2020-08-15 16:33:28 +02:00
Bram Moolenaar
d1103587cf
patch 8.2.1455: Vim9: crash when using typecast before constant
...
Problem: Vim9: crash when using typecast before constant.
Solution: Generate constant before checking type. Add tets.
2020-08-14 22:44:25 +02:00
Bram Moolenaar
79e8db9a21
patch 8.2.1454: Vim9: failure invoking lambda with wrong arguments
...
Problem: Vim9: failure invoking lambda with wrong arguments.
Solution: Handle invalid arguments. Add a test.
2020-08-14 22:16:33 +02:00
Bram Moolenaar
8de2f44ac6
patch 8.2.1453: Vim9: failure to compile lambda not tested
...
Problem: Vim9: failure to compile lambda not tested.
Solution: Add a test case.
2020-08-14 21:49:08 +02:00
Bram Moolenaar
41fab3eac8
patch 8.2.1451: Vim9: list type at script level only uses first item
...
Problem: Vim9: list type at script level only uses first item.
Solution: Use all members, like in a compiled function. (closes #6712 )
Also for dictionary.
2020-08-14 21:27:37 +02:00
Bram Moolenaar
418f1df547
patch 8.2.1435: Vim9: always converting to string for ".." leads to mistakes
...
Problem: Vim9: always converting to string for ".." leads to mistakes.
Solution: Only automatically convert simple types.
2020-08-12 21:34:49 +02:00
Bram Moolenaar
fd77748df2
patch 8.2.1434: Vim9: crash when lambda uses outer function argument
...
Problem: Vim9: crash when lambda uses outer function argument.
Solution: Set the flag that the outer context is used.
2020-08-12 19:42:01 +02:00
Bram Moolenaar
ba60cc45e7
patch 8.2.1433: Vim9: cannot mingle comments in multi-line lambda
...
Problem: Vim9: cannot mingle comments in multi-line lambda.
Solution: Skip over NULL lines. (closes #6694 )
2020-08-12 19:15:33 +02:00
Bram Moolenaar
6d91bcb4d2
patch 8.2.1432: various inconsistencies in test files
...
Problem: Various inconsistencies in test files.
Solution: Add modelines where they were missing. Use Check commands instead
of silently skipping over tests. Adjust indents and comments.
(Ken Takata, closes #6695 )
2020-08-12 18:50:36 +02:00
Bram Moolenaar
c3d6e8a46a
patch 8.2.1431: Vim9: no error for white space before comma in dict
...
Problem: Vim9: no error for white space before comma in dict.
Solution: Check for extra white space. (closes #6674 )
2020-08-12 18:34:28 +02:00