Bram Moolenaar
60dc8274e9
patch 8.2.3249: Vim9: error for re-imported function with default argument
...
Problem: Vim9: error for re-imported function with default argument.
Solution: Do not check argument type if it is still unknown. (closes #8653 )
2021-07-29 22:48:54 +02:00
Bram Moolenaar
921ba52926
patch 8.2.3248: Vim9: error message for wrong input uses wrong line number
...
Problem: Vim9: error message for wrong input uses wrong line number.
Solution: Use the line number of the start of the command. (issue #8653 )
2021-07-29 22:25:05 +02:00
Bram Moolenaar
2eb6fc3b52
patch 8.2.3216: Vim9: crash when using variable in a loop at script level
...
Problem: Vim9: crash when using variable in a loop at script level.
Solution: Do not clear the variable if a function was defined.
Do not create a new entry in sn_var_vals every time.
(closes #8628 )
2021-07-25 14:13:53 +02:00
Bram Moolenaar
d8e44476d8
patch 8.2.3197: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move a few more error messages to errors.h.
2021-07-21 22:20:33 +02:00
Bram Moolenaar
4db572eeb2
patch 8.2.3178: Vim9: the file name of an :import cannot be an expression
...
Problem: Vim9: the file name of an :import cannot be an expression.
Solution: Accept an expression that results in a string. Do not support
:import in a function.
2021-07-18 18:21:38 +02:00
Bram Moolenaar
c967d57aa9
patch 8.2.3129: Vim9: imported uninitialized list does not get type checked
...
Problem: Vim9: imported uninitialized list does not get type checked.
Solution: Get type from imported variable.
2021-07-08 21:38:50 +02:00
Bram Moolenaar
f055d45023
patch 8.2.3128: Vim9: uninitialzed list does not get type checked
...
Problem: Vim9: uninitialzed list does not get type checked.
Solution: Set the type when initializing the variable. (closes #8529 )
2021-07-08 20:57:24 +02:00
Bram Moolenaar
22480d147f
patch 8.2.3048: strange error for white space after ++ command
...
Problem: Strange error for white space after ++ command.
Solution: Check for white space explicitly. (closes #8440 )
2021-06-25 21:31:09 +02:00
Bram Moolenaar
f3d30842dc
patch 8.2.3047: increment and decrement don't allow for next command
...
Problem: Increment and decrement don't allow for next command.
Solution: Allow for comment and next command. (closes #8442 )
2021-06-25 19:29:30 +02:00
Bram Moolenaar
7423577180
patch 8.2.2982: Vim9: future commands are not reserved yet
...
Problem: Vim9: future commands are not reserved yet.
Solution: Add commands to be implemented later. Make "this" a reserved
name.
2021-06-12 14:53:05 +02:00
Bram Moolenaar
d0edaf9dc2
patch 8.2.2897: Vim9: can use reserved words at the script level
...
Problem: Vim9: can use reserved words at the script level.
Solution: Check variable names for reserved words. (closes #8253 )
2021-05-28 21:06:08 +02:00
Bram Moolenaar
bdc0f1c698
patch 8.2.2806: Vim9: using "++nr" as a command might not work
...
Problem: Vim9: using "++nr" as a command might not work.
Solution: Do not recognize "++" and "--" in a following line as addition or
subtraction.
2021-04-24 19:08:24 +02:00
Bram Moolenaar
96cf4ba8fb
patch 8.2.2805: Vim9: cannot use legacy syntax in Vim9 script
...
Problem: Vim9: cannot use legacy syntax in Vim9 script.
Solution: Add the :legacy command.
2021-04-24 14:15:41 +02:00
Bram Moolenaar
6c7cc347af
patch 8.2.2774: Vim9: cannot import an existing name even when using "as"
...
Problem: Vim9: cannot import an existing name even when using "as".
Solution: Do not check for an existing name when using "as". (closes #8113 )
2021-04-17 16:38:50 +02:00
Bram Moolenaar
f2253963c2
patch 8.2.2759: Vim9: for loop infers type of loop variable
...
Problem: Vim9: for loop infers type of loop variable.
Solution: Do not get the member type. (closes #8102 )
2021-04-13 20:53:13 +02:00
Bram Moolenaar
b91d3f857f
patch 8.2.2683: build failure without the +eval feature
...
Problem: Build failure without the +eval feature.
Solution: Add #ifdef.
2021-04-01 13:17:50 +02:00
Bram Moolenaar
529fb5a5f6
patch 8.2.2682: Vim9: cannot find Name.Func from "import * as Name"
...
Problem: Vim9: cannot find Name.Func from "import * as Name". (Alexander
Goussas)
Solution: When no variable found try finding a function. (closes #8045 )
Check that the function was exported.
2021-04-01 12:57:57 +02:00
Bram Moolenaar
e535db86e7
patch 8.2.2680: Vim9: problem defining a script variable from legacy function
...
Problem: Vim9: problem defining a script variable from legacy function.
Solution: Check if the script is Vim9, not the current syntax.
(closes #8032 )
2021-03-31 21:07:24 +02:00
Bram Moolenaar
a0399efa72
patch 8.2.2629: Vim9: error for #{{ is not desired
...
Problem: Vim9: error for #{{ is not desired.
Solution: Adjust the checks. (closes #7990 )
2021-03-20 15:00:01 +01:00
Bram Moolenaar
108cf0153c
patch 8.2.2621: typval2type() cannot handle recursive structures
...
Problem: typval2type() cannot handle recursive structures.
Solution: Use copyID. (closes #7979 )
2021-03-18 22:15:04 +01:00
Bram Moolenaar
4b3e1964d8
patch 8.2.2620: Vim9: Using #{ for a dictionary gives strange errors
...
Problem: Vim9: Using #{ for a dictionary gives strange errors.
Solution: Give an error when using #{ for a comment after a command.
2021-03-18 21:37:55 +01:00
Bram Moolenaar
6508880d6c
patch 8.2.2598: Vim9: :open does not need to be supported
...
Problem: Vim9: :open does not need to be supported.
Solution: Do not support :open in Vim9 script.
2021-03-13 21:07:21 +01:00
Bram Moolenaar
cb4e80fab9
patch 8.2.2597: Vim9: "import * as" does not work at script level
...
Problem: Vim9: "import * as" does not work at script level.
Solution: Implement using an imported namespace.
2021-03-13 20:57:19 +01:00
Bram Moolenaar
37294bd6a2
patch 8.2.2581: Vim9: sourcing Vim9 script triggers a redraw
...
Problem: Vim9: sourcing Vim9 script triggers a redraw.
Solution: Do not let setting/restoring 'cpoptions' cause a redraw.
(closes #7920 )
2021-03-10 13:40:08 +01:00
Bram Moolenaar
2e2d758902
patch 8.2.2566: Vim9: Function name is not recognized
...
Problem: Vim9: Function name is not recognized.
Solution: Change lookup_scriptvar() to also find function names.
(closes #7770 )
2021-03-03 21:22:41 +01:00
Bram Moolenaar
057e84afe5
patch 8.2.2558: no error if a lambda argument shadows a variable
...
Problem: No error if a lambda argument shadows a variable.
Solution: Check that the argument name shadows a local, argument or script
variable. (closes #7898 )
2021-02-28 16:55:11 +01:00
Bram Moolenaar
087b5ff35d
patch 8.2.2557: compiler warning for shadowd variable
...
Problem: Compiler warning for shadowd variable.
Solution: Declare "p" only once.
2021-02-27 23:39:22 +01:00
Bram Moolenaar
0a84284e60
patch 8.2.2556: Vim9: :import with "as" not fully supported
...
Problem: Vim9: :import with "as" not fully supported.
Solution: Implement "as" for more cases.
2021-02-27 22:41:19 +01:00
Bram Moolenaar
ada1d870b4
patch 8.2.2532: Vim9: confusing error if :k is used with a range
...
Problem: Vim9: confusing error if :k is used with a range.
Solution: Give an error about the range. (issue #7874 )
2021-02-20 08:16:51 +01:00
Bram Moolenaar
10b9421f3b
patch 8.2.2531: Vim9: the :k command is obscure
...
Problem: Vim9: the :k command is obscure.
Solution: Disallow using :k, can use :mark instead. (closes #7874 )
2021-02-19 21:42:57 +01:00
Bram Moolenaar
9979fcd72e
patch 8.2.2513: Vim9: missing part of :vim9cmd change
...
Problem: Vim9: missing part of :vim9cmd change.
Solution: Use command modifier in in_vim9script().
2021-02-14 13:30:01 +01:00
Bram Moolenaar
f785aa1354
patch 8.2.2501: not always clear where an error is reported
...
Problem: Not always clear where an error is reported.
Solution: Add the where_T structure and pass it around. (closes #7796 )
2021-02-11 21:19:34 +01:00
Bram Moolenaar
c3fc75db02
patch 8.2.2480: Vim9: some errors for white space do not show context
...
Problem: Vim9: some errors for white space do not show context.
Solution: Include the text at the error.
2021-02-07 15:28:09 +01:00
Bram Moolenaar
082517570d
patch 8.2.2331: Vim9: wrong error when modifying dict declared with :final
...
Problem: Vim9: wrong error when modifying dict declared with :final.
Solution: Do not check for writable variable when an index follows.
(closes #7657 )
2021-01-11 21:20:18 +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
dcc58e031d
patch 8.2.2239: Vim9: concatenating lines with backslash is inconvenient
...
Problem: Vim9: concatenating lines with backslash is inconvenient.
Solution: Support concatenating lines starting with '|', useful for
:autocmd, :command, etc. (closes #6702 )
2020-12-28 20:53:21 +01:00
Bram Moolenaar
9b8d62267f
patch 8.2.2238: Vim9: cannot load a Vim9 script without the +eval feature
...
Problem: Vim9: cannot load a Vim9 script without the +eval feature.
Solution: Support Vim9 script syntax without the +eval feature.
2020-12-28 18:26:00 +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
2b32700dab
patch 8.2.2222: Vim9: cannot keep script variables when reloading
...
Problem: Vim9: cannot keep script variables when reloading.
Solution: Add the "noclear" argument to :vim9script.
2020-12-26 15:39:31 +01:00
Bram Moolenaar
9e68c32563
patch 8.2.2209: Vim9: return type of => lambda not parsed
...
Problem: Vim9: return type of => lambda not parsed.
Solution: Parse and use the return type.
2020-12-25 12:38:04 +01:00
Bram Moolenaar
c0913d023b
patch 8.2.2093: Vim9: script test sometimes fails
...
Problem: Vim9: script test sometimes fails.
Solution: Do not find a script variable by its typval if the name was
cleared.
2020-12-05 14:44:37 +01:00
Bram Moolenaar
3e2534ed1a
patch 8.2.1918: Vim9: E1100 mentions :let
...
Problem: Vim9: E1100 mentions :let.
Solution: Mention "var". (closes #7207 )
2020-10-28 17:55:31 +01:00
Bram Moolenaar
39ca4127a0
patch 8.2.1870: Vim9: no need to keep all script variables
...
Problem: Vim9: no need to keep all script variables.
Solution: Only keep script variables when a function was defined that could
use them. Fix freeing static string on exit.
2020-10-20 14:25:07 +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
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
10c65860f8
patch 8.2.1813: Vim9: can assign wrong type to script dict
...
Problem: Vim9: can assign wrong type to script dict. (Christian J. Robinson)
Solution: Check the type if known.
2020-10-08 21:16:42 +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
f0afd9e182
patch 8.2.1674: Vim9: internal error when using variable that was not set
...
Problem: Vim9: internal error when using variable that was not set.
Solution: Give a meaningful error. (closes #6937 )
2020-09-13 18:57:47 +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