Bram Moolenaar
0ea0440865
patch 8.2.2297: Vim9: cannot set 'number' to a boolean value
...
Problem: Vim9: cannot set 'number' to a boolean value.
Solution: Use tv_get_bool(). (closes #7615 )
2021-01-04 13:37:54 +01:00
Bram Moolenaar
6797782127
patch 8.2.2291: Vim9: cannot use "null" for v:null
...
Problem: Vim9: cannot use "null" for v:null.
Solution: Support "null" like "true" and "false". (closes #7495 )
2021-01-03 21:53:53 +01:00
Bram Moolenaar
b0d8182fa3
patch 8.2.2285: Vim9: cannot set an option to a false
...
Problem: Vim9: cannot set an option to a false.
Solution: For VAR_BOOL use string "0". (closes #7603 )
2021-01-03 15:55:10 +01:00
Bram Moolenaar
31a201a04a
patch 8.2.2284: Vim9: cannot set an option to a boolean value
...
Problem: Vim9: cannot set an option to a boolean value.
Solution: Check for VAR_BOOL. (closes #7603 )
2021-01-03 14:47:25 +01:00
Bram Moolenaar
aa210a3aec
patch 8.2.2272: Vim9: extend() can violate the type of a variable
...
Problem: Vim9: extend() can violate the type of a variable.
Solution: Add the type to the dictionary or list and check items against it.
(closes #7593 )
2021-01-02 15:41:03 +01:00
Bram Moolenaar
3862ea3f62
patch 8.2.2268: Vim9: list unpack seen as declaration
...
Problem: Vim9: list unpack seen as declaration.
Solution: Check for "var". (closes #7594 )
2021-01-01 21:05:55 +01:00
Bram Moolenaar
c368957b19
patch 8.2.2267: Vim9: cannot use unlet for a dict member
...
Problem: Vim9: cannot use unlet for a dict member.
Solution: Pass GLV_NO_DECL to get_lval(). (closes #7585 )
2021-01-01 19:40:02 +01:00
Bram Moolenaar
e7a73e0762
patch 8.2.2266: Vim9: it can be hard to see where white space is missing
...
Problem: Vim9: it can be hard to see where white space is missing.
Solution: Mention the text where the error was seen. (closes #7580 )
2021-01-01 19:17:55 +01:00
Bram Moolenaar
a8b8af19e4
patch 8.2.2262: Vim9: converting bool to string prefixes v:
...
Problem: Vim9: converting bool to string prefixes v:.
Solution: Do not use the v: prefix.
2021-01-01 15:11:04 +01:00
Bram Moolenaar
dd1f426bd6
patch 8.2.2254: Vim9: bool option type is number
...
Problem: Vim9: bool option type is number.
Solution: Have get_option_value() return a different value for bool and
number options. (closes #7583 )
2020-12-31 17:41:01 +01:00
Bram Moolenaar
a629495530
patch 8.2.2225: Vim9: error when using :import in legacy script twice
...
Problem: Vim9: error when using :import in legacy script twice.
Solution: Make it possible to redefine an import when reloading.
2020-12-27 13:39:50 +01:00
Bram Moolenaar
07a65d26e7
patch 8.2.2224: Vim9: crash if script reloaded with different variable type
...
Problem: Vim9: crash if script reloaded with different variable type.
Solution: Check the type when accessing the variable.
2020-12-26 20:09:15 +01:00
Bram Moolenaar
1dcf55d4f1
patch 8.2.2195: failing tests for :const
...
Problem: Failing tests for :const.
Solution: Add missing check for ASSIGN_FINAL.
2020-12-22 22:07:30 +01:00
Bram Moolenaar
89b474dd4f
patch 8.2.2194: Vim9: cannot use :const or :final at the script level
...
Problem: Vim9: cannot use :const or :final at the script level.
Solution: Support using :const and :final. (closes #7526 )
2020-12-22 21:19:39 +01:00
Bram Moolenaar
3bdc90b7df
patch 8.2.2193: Vim9: can change constant in :def function
...
Problem: Vim9: can change constant in :def function.
Solution: Check if a variable is locked. (issue #7526 )
2020-12-22 20:35:40 +01:00
Bram Moolenaar
8f22f5c3aa
patch 8.2.2165: Vim9: assignment to dict member does not work
...
Problem: Vim9: assignment to dict member does not work.
Solution: Fix recognizing dict member. (closes #7484 )
2020-12-19 22:10:13 +01:00
Bram Moolenaar
03290b8444
patch 8.2.2162: Vim9: Cannot load or store autoload variables
...
Problem: Vim9: Cannot load or store autoload variables.
Solution: Add ISN_LOADAUTO and ISN_STOREAUTO. (closes #7485 )
2020-12-19 16:30:44 +01:00
Bram Moolenaar
9aed729fe9
patch 8.2.2157: Vim9: can delete a Vim9 script variable from a function
...
Problem: Vim9: can delete a Vim9 script variable from a function.
Solution: Check the variable is defined in Vim9 script. (closes #7483 )
2020-12-18 15:38:00 +01:00
Bram Moolenaar
709664cca0
patch 8.2.2131: Vim9: crash when lambda uses same var as assignment
...
Problem: Vim9: crash when lambda uses same var as assignment.
Solution: Do not let lookup_local change lv_from_outer, make a copy.
(closes #7461 )
2020-12-12 14:33:41 +01:00
Bram Moolenaar
f0068c5154
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
...
Problem: Can't get the exit value in VimLeave or VimLeavePre autocommands.
Solution: Add v:exiting like in Neovim. (Yegappan Lakshmanan, closes #7395 )
2020-11-30 17:42:10 +01:00
Bram Moolenaar
2ea95b61f4
patch 8.2.2018: Vim9: script variable not found from lambda
...
Problem: Vim9: script variable not found from lambda.
Solution: In a lambda also check the script hashtab for a variable without a
scope. (closes #7329 )
2020-11-19 21:47:56 +01:00
Bram Moolenaar
348be7ed07
patch 8.2.1949: Vim9: using extend() on null dict is silently ignored
...
Problem: Vim9: using extend() on null dict is silently ignored.
Solution: Give an error message. Initialize a dict variable with an empty
dictionary. (closes #7251 )
2020-11-04 11:36:35 +01:00
Bram Moolenaar
4ff2f2fb6b
patch 8.2.1901: variable completion does not work in command line window
...
Problem: Variable completion does not work in command line window.
Solution: Use the "prevwin". (closes #7198 )
2020-10-25 13:22:42 +01: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
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
ed234f24f3
patch 8.2.1849: Vim9: garbage collection frees block-local variables
...
Problem: Vim9: garbage collection frees block-local variables.
Solution: Mark all script variables as used.
2020-10-15 20:42:20 +02:00
Bram Moolenaar
8d739de43b
patch 8.2.1845: Vim9: function defined in a block can't use block variables
...
Problem: Vim9: function defined in a block can't use variables defined in
that block.
Solution: First step: Make a second hashtab that holds all script variables,
also block-local ones, with more information.
2020-10-14 19:39:19 +02:00
Bram Moolenaar
fcdc5d83fb
patch 8.2.1824: Vim9: variables at the script level escape their scope
...
Problem: Vim9: variables at the script level escape their scope.
Solution: When leaving a scope remove variables declared in it.
2020-10-10 19:07:09 +02:00
Bram Moolenaar
922acbda3d
patch 8.2.1814: missing change to remove "static"
...
Problem: Missing change to remove "static".
Solution: Add the change.
2020-10-08 21:30:40 +02:00
Bram Moolenaar
016faaa1b2
patch 8.2.1788: Vim9: still allows :let for declarations
...
Problem: Vim9: still allows :let for declarations.
Solution: Make the default for v:disallow_let one. It can still be set to
zero to allow for using :let.
2020-10-03 12:57:27 +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
f6a44f714a
patch 8.2.1753: Vim9: crash when using import at script level
...
Problem: Vim9: crash when using import at script level.
Solution: Give a "not implemented yet" error. (closes #7026 )
2020-09-27 13:51:14 +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
a187c43cfe
patch 8.2.1698: cannot lock a variable in legacy Vim script like in Vim9
...
Problem: Cannot lock a variable in legacy Vim script like in Vim9.
Solution: Make ":lockvar 0" work.
2020-09-16 21:08:28 +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
b0fa5e17c5
patch 8.2.1669: Vim9: memory leak when storing a value fails
...
Problem: Vim9: memory leak when storing a value fails.
Solution: Free the value when not storing it.
2020-09-12 19:51:42 +02:00
Bram Moolenaar
c1ec0422e4
patch 8.2.1650: Vim9: result of && and || expression is not bool in script
...
Problem: Vim9: result of && and || expression cannot be assigned to a bool
at the script level.
Solution: Add the VAR_BOOL_OK flag. Convert to bool when needed.
2020-09-09 22:27:58 +02:00
Bram Moolenaar
6f84b6db10
patch 8.2.1563: Vim9: error when using '%" with setbufvar() r getbufvar()
...
Problem: Vim9: error when using '%" with setbufvar() or getbufvar().
Solution: Use tv_get_buf_from_arg(). (closes #6816 )
2020-09-01 23:16:32 +02:00
Bram Moolenaar
e3d4685f1f
patch 8.2.1539: using invalid script ID causes a crash
...
Problem: Using invalid script ID causes a crash.
Solution: Check the script ID to be valid. (closes #6804 )
2020-08-29 13:39:17 +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
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
191929b182
patch 8.2.1489: Vim9: error when setting an option with setbufvar()
...
Problem: Vim9: error when setting an option with setbufvar().
Solution: Do not get a number from a string value. (closes #6740 )
2020-08-19 21:20:49 +02:00
Bram Moolenaar
021bda5671
patch 8.2.1473: items in a list given to :const can still be modified
...
Problem: Items in a list given to :const can still be modified.
Solution: Work like ":lockvar! name" but don't lock referenced items.
Make locking a blob work.
2020-08-17 21:07:22 +02:00
Bram Moolenaar
241572794f
patch 8.2.1471: :const only locks the variable, not the value
...
Problem: :const only locks the variable, not the value.
Solution: Lock the value as ":lockvar 1 var" would do. (closes #6719 )
2020-08-16 22:50:01 +02:00
Bram Moolenaar
0aae4809fd
patch 8.2.1469: Vim9: cannot assign string to string option
...
Problem: Vim9: cannot assign string to string option.
Solution: Change checks for option value. (closes #6720 )
2020-08-16 21:29: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
53b29e4845
patch 8.2.1459: Vim9: declaring script var in script does not infer the type
...
Problem: Vim9: declaring ascript variable at the script level does not
infer the type.
Solution: Get the type from the value. (closes #6716 )
2020-08-15 14:31:20 +02:00