LemonBoy
c5d2744c04
patch 9.0.1741: No type checking in interfaces
...
Problem: No type checking in interfaces
Solution: Implement member type check in vim9 interfaces
Most of the code is a small refactoring to allow the use of a where_T
for signaling the type mismatch, the type checking itself is pretty
simple.
Improve where_T error reports
Let the caller explicitly define the kind of location it's referring to
and free the WT_ARGUMENT enum from its catch-all role.
Implement type checking for interface methods
Follows closely the logic used for type-checking the members.
closes : #12844
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-08-19 13:04:53 +02:00
zeertzjq
4c7cb372c1
patch 9.0.1631: passing wrong variable type to option gives multiple errors
...
Problem: Passing a wrong variable type to an option gives multiple errors.
Solution: Bail out early on failure. (closes #12504 )
2023-06-14 16:39:54 +01:00
Bram Moolenaar
16d2c02c80
patch 9.0.1611: v:maxcol can be changed in a :for loop
...
Problem: v:maxcol can be changed in a :for loop.
Solution: Check for read-only loop variable. (closes #12470 )
2023-06-05 19:46:18 +01:00
Bram Moolenaar
097c5370ea
patch 9.0.1576: users may not know what to do with an internal error
...
Problem: Users may not know what to do with an internal error.
Solution: Add a translated message with instructions.
2023-05-24 21:02:24 +01:00
zeertzjq
474891bc89
patch 9.0.1447: condition is always true
...
Problem: Condition is always true.
Solution: Remove the useless condition. (closes #12253 )
2023-04-12 21:36:03 +01:00
Yegappan Lakshmanan
14113fdf9c
patch 9.0.1390: FOR_ALL_ macros are defined in an unexpected file
...
Problem: FOR_ALL_ macros are defined in an unexpected file.
Solution: Move FOR_ALL_ macros to macros.h. Add FOR_ALL_HASHTAB_ITEMS.
(Yegappan Lakshmanan, closes #12109 )
2023-03-07 17:13:51 +00:00
zeertzjq
1b438a8228
patch 9.0.1271: using sizeof() and subtract array size is tricky
...
Problem: Using sizeof() and subtract array size is tricky.
Solution: Use offsetof() instead. (closes #11926 )
2023-02-01 13:11:15 +00:00
Bram Moolenaar
ce93d162da
patch 9.0.1266: error for space before ": type" is inconsistent
...
Problem: Error for space before ": type" is inconsistent.
Solution: Give E1059 in more places. (closes #11868 )
2023-01-30 21:12:34 +00:00
Bram Moolenaar
c0c2c26265
patch 9.0.1188: return value of type() for class and object unclear
...
Problem: Return value of type() for class and object unclear.
Solution: Add v:t_object and v:t_class.
2023-01-12 21:08:53 +00:00
Bram Moolenaar
4059400993
patch 9.0.1186: imported class does not work when used twice in a line
...
Problem: Imported class does not work when used twice in a line.
Solution: Fix the type parsing.
2023-01-12 20:04:51 +00:00
Bram Moolenaar
a86655af84
patch 9.0.1185: using class from imported script not tested
...
Problem: Using class from imported script not tested.
Solution: Add tests. Implement what is missing.
2023-01-12 17:06:27 +00:00
Bram Moolenaar
94674f2223
patch 9.0.1152: class "implements" argument not implemented
...
Problem: Class "implements" argument not implemented.
Solution: Implement "implements" argument. Add basic checks for when a
class implements an interface.
2023-01-06 18:42:20 +00:00
zeertzjq
ea720aea85
patch 9.0.1137: some conditions are always false
...
Problem: Some conditions are always false.
Solution: Remove the useless conditions. (closes #11776 )
2023-01-03 10:54:09 +00:00
Bram Moolenaar
a9fa8c58fb
patch 9.0.1133: error message names do not match the items
...
Problem: Error message names do not match the items.
Solution: Add "_str" when the text contains "%s".
2023-01-02 18:10:04 +00:00
Yegappan Lakshmanan
dc4daa3a39
patch 9.0.1132: code is indented more than needed
...
Problem: Code is indented more than needed.
Solution: Use an early return to reduce indentation. (Yegappan Lakshmanan,
closes #11769 )
2023-01-02 16:54:53 +00:00
Bram Moolenaar
00b28d6c23
patch 9.0.1031: Vim9 class is not implemented yet
...
Problem: Vim9 class is not implemented yet.
Solution: Add very basic class support.
2022-12-08 15:32:33 +00:00
Bram Moolenaar
c96b7f5d2a
patch 9.0.0990: callback name argument is changed by setqflist()
...
Problem: Callback name argument is changed by setqflist().
Solution: Use the expanded function name for the callback, do not store it
in the argument. (closes #11653 )
2022-12-02 15:58:38 +00:00
Bram Moolenaar
e76062c078
patch 9.0.0965: using one window for executing autocommands is insufficient
...
Problem: Using one window for executing autocommands is insufficient.
Solution: Use up to five windows for executing autocommands.
2022-11-28 18:51:43 +00:00
Bram Moolenaar
ef2c325f5e
patch 9.0.0949: crash when unletting a variable while listing variables
...
Problem: Crash when unletting a variable while listing variables.
Solution: Disallow changing a hashtable while going over the entries.
(closes #11435 )
2022-11-25 16:31:51 +00:00
Bram Moolenaar
1573e73f1c
patch 9.0.0890: no test for what patch 9.0.0827 fixes
...
Problem: No test for what patch 9.0.0827 fixes.
Solution: Add a test (still doesn't fail when fix is reverted).
2022-11-16 20:33:21 +00:00
Bram Moolenaar
6c4d4a6444
patch 9.0.0744: in script in autoload dir exported variable is not found
...
Problem: In script in autoload dir exported variable is not found. (Doug
Kearns)
Solution: Find the variable with the "script#" prefix. (closes #11361 )
2022-10-13 17:47:42 +01:00
Bram Moolenaar
d987642626
patch 9.0.0732: no check for white space before and after "=<<"
...
Problem: No check for white space before and after "=<<". (Doug Kearns)
Solution: Check for white space in Vim9 script. (closes #11351 )
2022-10-12 12:58:54 +01:00
Bram Moolenaar
a4e0b9785e
patch 9.0.0634: evaluating "expr" options has more overhead than needed
...
Problem: Evaluating "expr" options has more overhead than needed.
Solution: Use call_simple_func() for 'foldtext', 'includeexpr', 'printexpr',
"expr" of 'spellsuggest', 'diffexpr', 'patchexpr', 'balloonexpr',
'formatexpr', 'indentexpr' and 'charconvert'.
2022-10-01 19:43:52 +01:00
Bram Moolenaar
e8e369a796
patch 9.0.0535: closure gets wrong value in for loop with two loop variables
...
Problem: Closure gets wrong value in for loop with two loop variables.
Solution: Correctly compute the number of loop variables to clear.
2022-09-21 18:59:14 +01:00
Bram Moolenaar
766ae5b252
patch 9.0.0460: loop variable can't be found
...
Problem: Loop variable can't be found.
Solution: Adjust block_id of the loop variable each round.
2022-09-14 00:30:51 +01:00
Bram Moolenaar
9510d22463
patch 9.0.0444: trying to declare g:variable gives confusing error
...
Problem: Trying to declare g:variable gives confusing error.
Solution: Give a better error message. (closes #11108 )
2022-09-11 15:14:05 +01:00
Bram Moolenaar
ca16c60f33
patch 9.0.0398: members of funccall_T are inconsistently named
...
Problem: Members of funccall_T are inconsistently named.
Solution: Use the "fc_" prefix for all members.
2022-09-06 18:57:08 +01:00
Yegappan Lakshmanan
c99e182e1f
patch 9.0.0364: clang static analyzer gives warnings
...
Problem: Clang static analyzer gives warnings.
Solution: Avoid the warnings. (Yegappan Lakshmanan, closes #11043 )
2022-09-03 10:52:24 +01:00
thinca
6c667bdc94
patch 9.0.0355: check for uppercase char in autoload name is wrong
...
Problem: Check for uppercase char in autoload name is wrong, it checks the
name of the script.
Solution: Remove the check. (closes #11031 )
2022-09-02 11:25:37 +01:00
Bram Moolenaar
753885b6c5
patch 9.0.0253: a symlink to an autoload script results in two entries
...
Problem: A symlink to an autoload script results in two entries in the list
of scripts, items expected in one are actually in the other.
Solution: Have one script item refer to the actually sourced one.
(closes #10960 )
2022-08-24 16:30:36 +01:00
Bram Moolenaar
a4d158b3c8
patch 9.0.0206: redraw flags are not named specifically
...
Problem: Redraw flags are not named specifically.
Solution: Prefix "UPD_" to the flags, for UPDate_screen().
2022-08-14 14:17:45 +01:00
Shougo Matsushita
61021aa318
patch 9.0.0092: plugins cannot change v:completed_item
...
Problem: Plugins cannot change v:completed_item.
Solution: Make v:completed_item writeable. (Shougo Matsushita,
closes #10801 )
2022-07-27 14:40:00 +01:00
Bram Moolenaar
28f84e17b0
patch 9.0.0090: no error when assigning bool to a string option
...
Problem: No error when assigning bool to a string option with setwinvar().
Solution: Give an error (closes #10766 )
2022-07-27 12:30:13 +01:00
zeertzjq
cd6ad6439d
patch 9.0.0066: switching window uneccarily when getting buffer options
...
Problem: Switching window uneccarily when getting buffer options.
Solution: Do not switch window when getting buffer options. (closes #10767 )
2022-07-25 12:28:09 +01:00
Yegappan Lakshmanan
ee47eaceaa
patch 9.0.0003: functions are global while they could be local
...
Problem: Functions are global while they could be local.
Solution: Add "static". Add a few tests. (Yegappan Lakshmanan,
closes #10612 )
2022-06-29 12:55:36 +01:00
mityu
8be36eecdc
patch 8.2.5017: gcc 12.1 warns for uninitialized variable
...
Problem: Gcc 12.1 warns for uninitialized variable.
Solution: Initialize the variable. (closes #10476 )
2022-05-25 17:29:46 +01:00
Bram Moolenaar
70c41241c2
patch 8.2.4934: string interpolation fails when not evaluating
...
Problem: String interpolation fails when not evaluating.
Solution: Skip the expression when not evaluating. (closes #10398 )
2022-05-10 18:11:43 +01:00
Bram Moolenaar
0abc2871c1
patch 8.2.4930: interpolated string expression requires escaping
...
Problem: Interpolated string expression requires escaping.
Solution: Do not require escaping in the expression.
2022-05-10 13:24:30 +01:00
LemonBoy
2eaef106e4
patch 8.2.4883: string interpolation only works in heredoc
...
Problem: String interpolation only works in heredoc.
Solution: Support interpolated strings. Use syntax for heredoc consistent
with strings, similar to C#. (closes #10327 )
2022-05-06 13:14:50 +01:00
LemonBoy
47d4e317f8
patch 8.2.4866: duplicate code in "get" functions
...
Problem: Duplicate code in "get" functions.
Solution: Use get_var_from() for getwinvar(), gettabvar(), gettabwinvar()
and getbufvar(). (closes #10335 )
2022-05-04 18:12:55 +01:00
Bram Moolenaar
05c7f5d3d0
patch 8.2.4840: heredoc expression evaluated even when skipping
...
Problem: Heredoc expression evaluated even when skipping.
Solution: Don't evaluate when "skip" is set. (closes #10306 )
2022-04-28 16:51:41 +01:00
Yegappan Lakshmanan
1fc6ea9bf3
patch 8.2.4804: expression in heredoc doesn't work for compiled function
...
Problem: Expression in heredoc doesn't work for compiled function.
Solution: Implement compiling the heredoc expressions. (Yegappan Lakshmanan,
closes #10232 )
2022-04-21 23:30:15 +01:00
Bram Moolenaar
42ccb8d747
patch 8.2.4783: Coverity warns for leaking memory
...
Problem: Coverity warns for leaking memory.
Solution: Use another strategy freeing "theline".
2022-04-18 15:45:23 +01:00
Yegappan Lakshmanan
efbfa867a1
patch 8.2.4770: cannot easily mix expression and heredoc
...
Problem: Cannot easily mix expression and heredoc.
Solution: Support in heredoc. (Yegappan Lakshmanan, closes #10138 )
2022-04-17 12:47:40 +01:00
LemonBoy
7714231bb5
patch 8.2.4754: using cached values after unsetting some environment variables
...
Problem: Still using cached values after unsetting some known environment
variables.
Solution: Take care of the side effects. (closes #10194 )
2022-04-15 20:50:46 +01:00
Bram Moolenaar
31e5c60a68
patch 8.2.4753: error from setting an option is silently ignored
...
Problem: Error from setting an option is silently ignored.
Solution: Handle option value errors better. Fix uses of N_().
2022-04-15 13:53:33 +01:00
Bram Moolenaar
aa7d0c2335
patch 8.2.4698: Vim9: script variable has no flag that it was set
...
Problem: Vim9: script variable has no flag that it was set.
Solution: Add a flag that it was set, to avoid giving it a value when used.
(closes #10088 )
2022-04-05 21:40:38 +01:00
Bram Moolenaar
7a411a306f
patch 8.2.4682: Vim9: can use :unlockvar for const variable
...
Problem: Vim9: can use :unlockvar for const variable. (Ernie Rael)
Solution: Check whether the variable is a const.
2022-04-04 14:58:06 +01:00
Bram Moolenaar
22ebd172e4
patch 8.2.4662: no error for using out of range list index
...
Problem: No error for using out of range list index.
Solution: Check list index at script level like in compiled function.
(closes #10051 )
2022-04-01 15:26:58 +01:00
Bram Moolenaar
859cc21c6b
patch 8.2.4642: Vim9: in :def function script var cannot be null
...
Problem: Vim9: in :def function script var cannot be null.
Solution: Only initialize a script variable when not set to a null value.
(closes #10034 )
2022-03-28 15:22:35 +01:00