Bram Moolenaar
efd8855594
patch 8.2.1006: Vim9: require unnecessary return statement
...
Problem: Vim9: require unnecessary return statement.
Solution: Improve the use of the had_return flag. (closes #6270 )
2020-06-18 20:50:10 +02:00
Bram Moolenaar
9b68c82b7c
patch 8.2.1005: Vim9: using TRUE/FALSE/MAYBE for ctx_skip is confusing
...
Problem: Vim9: using TRUE/FALSE/MAYBE for ctx_skip is confusing.
Solution: Use an enum value.
2020-06-18 19:31:08 +02:00
Bram Moolenaar
72abcf42d4
patch 8.2.1001: Vim9: crash with nested "if" and assignment
...
Problem: Vim9: crash with nested "if" and assignment.
Solution: Skip more of the assignment. Do not set ctx_skip when code is
reachable.
2020-06-18 18:26:24 +02:00
Bram Moolenaar
9af78769ee
patch 8.2.0987: Vim9: cannot assign to [var; var]
...
Problem: Vim9: cannot assign to [var; var].
Solution: Assign rest of items to a list.
2020-06-16 11:34:42 +02:00
Bram Moolenaar
47a519a933
patch 8.2.0981: Vim9: cannot compile "[var, var] = list"
...
Problem: Vim9: cannot compile "[var, var] = list".
Solution: Implement list assignment.
2020-06-14 23:05:10 +02:00
Bram Moolenaar
34db91f7a4
patch 8.2.0973: Vim9: type is not checked when assigning to a script variable
...
Problem: Vim9: type is not checked when assigning to a script variable.
Solution: Check the type.
2020-06-13 19:00:10 +02:00
Bram Moolenaar
c82a5b5da5
patch 8.2.0972: Vim9 script variable declarations need a type
...
Problem: Vim9 script variable declarations need a type.
Solution: Make "let var: type" declare a script-local variable.
2020-06-13 18:09:19 +02:00
Bram Moolenaar
71ccd03ee8
patch 8.2.0967: unnecessary type casts for vim_strnsave()
...
Problem: Unnecessary type casts for vim_strnsave().
Solution: Remove the type casts.
2020-06-12 22:59:11 +02:00
Bram Moolenaar
25e0f5863e
patch 8.2.0823: Vim9: script reload test is disabled
...
Problem: Vim9: script reload test is disabled.
Solution: Compile a function in the context of the script where it was
defined. Set execution stack for compiled function. Add a test
that an error is reported for the right file/function.
2020-05-25 22:36:50 +02:00
Bram Moolenaar
45a1508a22
patch 8.2.0821: Vim9: memory leak in expr test
...
Problem: Vim9: memory leak in expr test.
Solution: Do not decrement the length of the list of functions if the
current function is not at the end.
2020-05-25 00:28:33 +02:00
Bram Moolenaar
6ff71d8b7f
patch 8.2.0820: Vim9: function type isn't set until compiled
...
Problem: Vim9: function type isn't set until compiled.
Solution: Set function type early.
2020-05-24 23:45:24 +02:00
Bram Moolenaar
822ba24743
patch 8.2.0818: Vim9: using a discovery phase doesn't work well
...
Problem: Vim9: using a discovery phase doesn't work well.
Solution: Remove the discovery phase, instead compile a function only when
it is used. Add :defcompile to compile def functions earlier.
2020-05-24 23:00:18 +02:00
Bram Moolenaar
a6e67e4f41
patch 8.2.0764: Vim9: assigning to option not fully tested
...
Problem: Vim9: assigning to option not fully tested.
Solution: Add more test cases. Allow using any type for assignment.
2020-05-15 23:36:40 +02:00
Bram Moolenaar
32e351179e
patch 8.2.0753: Vim9: expressions are evaluated in the discovery phase
...
Problem: Vim9: expressions are evaluated in the discovery phase.
Solution: Bail out if an expression is not a constant. Require a type for
declared constants.
2020-05-14 22:41:15 +02:00
Bram Moolenaar
bc38f25c02
patch 8.2.0735: Vim9: using unitialized memory
...
Problem: Vim9: using unitialized memory.
Solution: Clear the arg_lvar field.
2020-05-10 23:20:06 +02:00
Bram Moolenaar
cb2bdb1c6d
patch 8.2.0733: Vim9: assigning to dict or list argument does not work
...
Problem: Vim9: assigning to dict or list argument does not work.
Solution: Recognize an argument as assignment target.
2020-05-10 22:53:56 +02:00
Bram Moolenaar
1cc2a94f80
patch 8.2.0730: Vim9: Assignment to dict member does not work
...
Problem: Vim9: Assignment to dict member does not work.
Solution: Parse dict assignment. Implement getting dict member.
2020-05-10 19:10:31 +02:00
Bram Moolenaar
09689a0284
patch 8.2.0725: Vim9: cannot call a function declared later in Vim9 script
...
Problem: Vim9: cannot call a function declared later in Vim9 script.
Solution: Make two passes through the script file.
2020-05-09 22:50:08 +02:00
Bram Moolenaar
1c74721233
patch 8.2.0723: Vim9: nested constant expression not evaluated compile time
...
Problem: Vim9: nested constant expression not evaluated compile time.
Solution: Use compile_expr1() for parenthesis.
2020-05-09 18:28:34 +02:00
Bram Moolenaar
7f14155f42
patch 8.2.0722: Vim9: not handling constant expression for elseif
...
Problem: Vim9: not handling constant expression for elseif.
Solution: Use postponed constants. Delete the code for evaluating a
constant expression.
2020-05-09 17:35:53 +02:00
Bram Moolenaar
497f76bfbf
patch 8.2.0721: Vim9: leaking memory when skipping
...
Problem: Vim9: leaking memory when skipping.
Solution: Disable skipping in generate_ppconst().
2020-05-09 16:44:22 +02:00
Bram Moolenaar
a5565e4189
patch 8.2.0719: Vim9: more expressions can be evaluated at compile time
...
Problem: Vim9: more expressions can be evaluated at compile time
Solution: Recognize has('name').
2020-05-09 15:44:01 +02:00
Bram Moolenaar
7d131b0715
patch 8.2.0717: Vim9: postponed constant expressions does not scale
...
Problem: Vim9: postponed constant expressions does not scale.
Solution: Add a structure to pass around postponed constants.
2020-05-08 19:10:34 +02:00
Bram Moolenaar
5c2fe64443
patch 8.2.0716: Vim9: another memory leak
...
Problem: Vim9: another memory leak.
Solution: Clear typval when failing.
2020-05-07 23:20:21 +02:00
Bram Moolenaar
cca34aa4be
patch 8.2.0715: Vim9: leaking memory
...
Problem: Vim9: leaking memory.
Solution: Free strings after concatenating them.
2020-05-07 22:23:58 +02:00
Bram Moolenaar
f0eefce93b
patch 8.2.0714: Vim9: handling constant expression does not scale
...
Problem: Vim9: handling constant expression does not scale.
Solution: Use another solution, passint typval_T.
2020-05-07 22:19:01 +02:00
Bram Moolenaar
61a8981699
patch 8.2.0708: Vim9: constant expressions are not simplified
...
Problem: Vim9: constant expressions are not simplified.
Solution: Simplify string concatenation.
2020-05-07 16:58:17 +02:00
Bram Moolenaar
b68b346e6d
patch 8.2.0703: Vim9: closure cannot store value in outer context
...
Problem: Vim9: closure cannot store value in outer context.
Solution: Make storing value in outer context work. Make :disassemble
accept a function reference.
2020-05-06 21:06:30 +02:00
Bram Moolenaar
221fcc741a
patch 8.2.0697: Vim9: memory leak when using nested function
...
Problem: Vim9: memory leak when using nested function.
Solution: Unreference function when deleting instructions. Adjust reference
count for local variables.
2020-05-05 19:46:20 +02:00
Bram Moolenaar
0e65d3de0a
patch 8.2.0696: Vim9: nested function does not work properly
...
Problem: Vim9: nested function does not work properly
Solution: Create a function reference. Check argument count.
2020-05-05 17:53:16 +02:00
Bram Moolenaar
04b1269783
patch 8.2.0695: Vim9: cannot define a function inside a function
...
Problem: Vim9: cannot define a function inside a function.
Solution: Initial support for :def inside :def.
2020-05-04 23:24:44 +02:00
Bram Moolenaar
2fd4cd755c
patch 8.2.0693: closure using argument not tested
...
Problem: Closure using argument not tested.
Solution: Add a test, make it work.
2020-05-03 22:30:49 +02:00
Bram Moolenaar
3df02f507f
patch 8.2.0685: Build failure
...
Problem: Build failure.
Solution: Include missing changes.
2020-05-03 15:47:33 +02:00
Bram Moolenaar
5adc55cb74
patch 8.2.0683: Vim9: parsing type does not always work
...
Problem: Vim9: parsing type does not always work.
Solution: Handle func type without return value. Test more closures.
Fix type check offset. Fix garbage collection.
2020-05-02 23:12:58 +02:00
Bram Moolenaar
1c0d44f8ef
patch 8.2.0682: Vim9: parsing function argument type can get stuck
...
Problem: Vim9: parsing function argument type can get stuck.
Solution: Bail out when not making progress.
2020-05-02 19:04:58 +02:00
Bram Moolenaar
bf67ea1af0
patch 8.2.0679: Vim9: incomplete support for closures
...
Problem: Vim9: incomplete support for closures.
Solution: At the end of a function copy arguments and local variables if
they are still used by a referenced closure.
2020-05-02 17:52:42 +02:00
Bram Moolenaar
c8cd2b34d1
patch 8.2.0677: Vim9: no support for closures
...
Problem: Vim9: no support for closures.
Solution: Find variables in the outer function scope, so long as the scope
exists.
2020-05-01 19:29:08 +02:00
Bram Moolenaar
b84a381c75
patch 8.2.0675: Vim9: no support for closures
...
Problem: Vim9: no support for closures.
Solution: Do not re-use stack entries.
2020-05-01 15:44:29 +02:00
Bram Moolenaar
939b5db480
patch 8.2.0659: Vim9: no test for equal func type
...
Problem: Vim9: no test for equal func type.
Solution: Add a test. Improve type check.
2020-04-28 22:49:08 +02:00
Bram Moolenaar
a0a9f43ab2
patch 8.2.0657: Vim9: no check if called variable is a FuncRef
...
Problem: Vim9: no check if called variable is a FuncRef.
Solution: Add a type check.
2020-04-28 21:29:34 +02:00
Bram Moolenaar
4c17ad94ec
patch 8.2.0650: Vim9: script function can be deleted
...
Problem: Vim9: script function can be deleted.
Solution: Disallow deleting script function. Delete functions when sourcing
a script again.
2020-04-27 22:47:51 +02:00
Bram Moolenaar
7d41aa8874
patch 8.2.0642: Vim9: using invalid index
...
Problem: Vim9: using invalid index.
Solution: Check index for being valid. Fix memory leak.
2020-04-26 14:29:56 +02:00
Bram Moolenaar
6378c4fef3
patch 8.2.0641: Vim9: not expanded in :hardcopy and syn-include
...
Problem: Vim9: not expanded in :hardcopy and "syntax include".
Solution: Add the EX_EXPAND flag. Expend "syntax include".
2020-04-26 13:50:41 +02:00
Bram Moolenaar
cfe435d7fe
patch 8.2.0640: Vim9: expanding does not work
...
Problem: Vim9: expanding does not work.
Solution: Find wildcards in not compiled commands. Reorganize test files.
2020-04-25 20:02:55 +02:00
Bram Moolenaar
f93c7fea08
patch 8.2.0626: Vim9: wrong syntax of function in Vim9 script
...
Problem: Vim9: wrong syntax of function in Vim9 script.
Solution: Give error for missing space. Implement :echomsg and :echoerr.
(closes #5670 )
2020-04-23 22:16:53 +02:00
Bram Moolenaar
1df8b3fb04
patch 8.2.0625: Vim9: confusing error when calling unknown function
...
Problem: Vim9: confusing error when calling unknown function.
Solution: Give error while compiling.
2020-04-23 18:13:23 +02:00
Bram Moolenaar
a72cfb80cd
patch 8.2.0624: Vim9: no check for space before #comment
...
Problem: Vim9: no check for space before #comment.
Solution: Add space checks. Fix :throw with double quoted string.
2020-04-23 17:07:30 +02:00
Bram Moolenaar
7bdaea6e0d
patch 8.2.0605: Vim9: cannot unlet an environment variable
...
Problem: Vim9: cannot unlet an environment variable.
Solution: Implement unlet for $VAR.
2020-04-19 18:27:26 +02:00
Bram Moolenaar
d72c1bf0a6
patch 8.2.0601: Vim9: :unlet is not compiled
...
Problem: Vim9: :unlet is not compiled.
Solution: Implement :unlet instruction and check for errors.
2020-04-19 16:28:59 +02:00
Bram Moolenaar
d3aac2917d
patch 8.2.0600: Vim9: cannot read or write w:, t: and b: variables
...
Problem: Vim9: cannot read or write w:, t: and b: variables.
Solution: Implement load and store for w:, t: and b: variables.
(closes #5950 )
2020-04-19 14:32:17 +02:00