Bram Moolenaar
397a87ac1c
patch 8.2.4602: Vim9: not enough test coverage for executing :def function
...
Problem: Vim9: not enough test coverage for executing :def function.
Solution: Add a few more tests. Fix uncovered problem. Remove dead code.
2022-03-20 21:14:15 +00:00
Bram Moolenaar
2995e5cf4e
patch 8.2.4590: Vim9: range type check has wrong offset
...
Problem: Vim9: range type check has wrong offset.
Solution: Adjust offset for CHECKTYPE. Remove other type check.
2022-03-18 21:41:47 +00:00
Bram Moolenaar
2e17fef225
patch 8.2.4589: cannot index the g: dictionary
...
Problem: Cannot index the g: dictionary.
Solution: Recognize using "g:[key]". (closes #9969 )
2022-03-18 19:44:48 +00:00
Bram Moolenaar
139575de66
patch 8.2.4575: Vim9: test for profiling still fails
...
Problem: Vim9: test for profiling still fails.
Solution: Update flags for profiling and breakpoints when obtaining the
compile type. Do not set the FC_CLOSURE flag for a toplevel
function.
2022-03-15 19:29:30 +00:00
Bram Moolenaar
96923b7a14
patch 8.2.4573: a nested function is compiled for debugging without context
...
Problem: A nested function (closure) is compiled for debugging without
context.
Solution: Check if a nested function is marked for debugging before
compiling it. Give an error when trying to compile a closure
without its context. (closes #9951 )
2022-03-15 15:57:04 +00:00
Bram Moolenaar
4f3321f704
patch 8.2.4556: test fails without the +job or +channel feature
...
Problem: Test fails without the +job or +channel feature. (Dominique Pellé)
Solution: Adjust #ifdefs. Pass on skip flag. (closes #9942 )
2022-03-13 13:12:27 +00:00
Bram Moolenaar
53ba6ca5b2
patch 8.2.4539: when comparing special v:none and v:null are handled the same
...
Problem: When comparing special v:none and v:null are handled the same when
compiling.
Solution: Pass more information so that v:none can be handled differently at
compile time. (issue #9923 )
2022-03-10 19:23:28 +00:00
Bram Moolenaar
8acb9cc620
patch 8.2.4526: Vim9: cannot set variables to a null value
...
Problem: Vim9: cannot set variables to a null value.
Solution: Add null_list, null_job, etc.
2022-03-08 13:18:55 +00:00
Bram Moolenaar
204852ae2a
patch 8.2.4510: Vim9: shortening commands leads to confusing script
...
Problem: Vim9: shortening commands leads to confusing script.
Solution: In Vim9 script require at least ":cont" for ":continue", "const"
instead of "cons", "break" instead of "brea", "catch" instead of
"cat", "else" instead of "el" "elseif" instead of "elsei" "endfor"
instead of "endfo" "endif" instead of "en" "endtry" instead of
"endt", "finally" instead of "fina", "throw" instead of "th",
"while" instead of "wh".
2022-03-05 12:56:44 +00:00
Bram Moolenaar
e1d1211799
patch 8.2.4509: Vim9: can declare a variable with ":va"
...
Problem: Vim9: can declare a variable with ":va".
Solution: Disallow using ":va", require using ":var".
2022-03-05 11:37:48 +00:00
Bram Moolenaar
dea5ab0fc5
patch 8.2.4460: Vim9: wrong error for defining dict function
...
Problem: Vim9: wrong error for defining dict function.
Solution: Explicitly check for trying to define a dict function.
(closes 9827)
2022-02-23 22:12:02 +00:00
Bram Moolenaar
afa048f0d4
patch 8.2.4447: Vim9: can still use s:var in a compiled function
...
Problem: Vim9: can still use s:var in a compiled function.
Solution: Disallow using s:var for Vim9 script. (closes #9824 )
2022-02-22 20:43:36 +00:00
Bram Moolenaar
c1e6c7bafe
patch 8.2.4426: map() function on string and blob does not check types
...
Problem: map() function on string and blob does not check argument types at
compile time.
Solution: Check string and blob argument types. Support "0z1234->func()".
2022-02-20 18:26:46 +00:00
Bram Moolenaar
8b716f5f22
patch 8.2.4395: some code lines not covered by tests
...
Problem: Some code lines not covered by tests.
Solution: Add a few more test cases. Fix getting more than one error for
invalid assignment.
2022-02-15 21:17:56 +00:00
Bram Moolenaar
e88c6b7a5d
patch 8.2.4390: Vim9: list from declaration with inferred type not set
...
Problem: Vim9: list from declaration with inferred type does not set the
type on the value.
Solution: When inferring the type in a variable declaration also set the
type of the list or dictionary. (closes #9705 ) Do not set the
type when the member is "any".
2022-02-15 15:37:11 +00:00
Bram Moolenaar
bc51006402
patch 8.2.4384: Vim9: error message not tested, some code not tested
...
Problem: Vim9: error message not tested, some code not tested.
Solution: Add a couple of test cases. Give an error for a command modifier
without a command.
2022-02-14 21:19:04 +00:00
Bram Moolenaar
7a3b802bab
patch 8.2.4383: Vim9: unused code lines
...
Problem: Vim9: unused code lines.
Solution: Rely on either "cctx" or "cstack" to not be NULL.
2022-02-14 19:53:03 +00:00
Bram Moolenaar
4b1d963972
patch 8.2.4375: ctx_imports is not used
...
Problem: ctx_imports is not used.
Solution: Delete ctx_imports. Add missing dependency.
2022-02-13 21:51:08 +00:00
Bram Moolenaar
0631bb4ed7
patch 8.2.4374: unreachable code
...
Problem: Unreachable code.
Solution: Remove outdated code lines.
2022-02-13 21:20:21 +00:00
Bram Moolenaar
a749a42ed2
patch 8.2.4360: Vim9: allowing use of "s:" leads to inconsistencies
...
Problem: Vim9: allowing use of "s:" leads to inconsistencies.
Solution: Disallow using "s:" in Vim9 script at the script level.
2022-02-12 19:52:25 +00:00
Bram Moolenaar
b6a138eb33
patch 8.2.4333: cstack not always passed to where it is needed
...
Problem: cstack not always passed to where it is needed.
Solution: Pass ctack through functions.
2022-02-08 21:17:22 +00:00
Bram Moolenaar
dce2441a60
patch 8.2.4332: Vim9: incomplete test for existing script variable in block
...
Problem: Vim9: incomplete test for existing script variable in block.
Solution: Add a couple more tests. Fix uncovered problem.
2022-02-08 20:35:30 +00:00
Bram Moolenaar
3787f26c2e
patch 8.2.4324: Vim9: script-local function name can start with "_"
...
Problem: Vim9: script-local function name can start with "_".
Solution: Check for leading capital after "s:". Correct error message.
2022-02-07 21:54:01 +00:00
Bram Moolenaar
f681cfb90b
patch 8.2.4323: Vim9: nested function name can start with "_"
...
Problem: Vim9: nested function name can start with "_".
Solution: Use same rule for function name for nested functions.
(closes #9713 )
2022-02-07 20:30:57 +00:00
Bram Moolenaar
8cbf249917
patch 8.2.4314: test fails where lines are skipped
...
Problem: Test fails where lines are skipped.
Solution: Only give an error when not skipping commands.
2022-02-06 20:28:13 +00:00
Bram Moolenaar
107f7325f6
patch 8.2.4312: no error for using :vim9script in a :def function
...
Problem: No error for using :vim9script in a :def function.
Solution: Give an error when compiling.
2022-02-06 17:30:41 +00:00
Bram Moolenaar
a1c5195180
patch 8.2.4285: Vim9: type of item in for loop not checked properly
...
Problem: Vim9: type of item in for loop not checked properly.
Solution: Adjust the type checking. (closes #9683 )
2022-02-02 16:20:26 +00:00
Bram Moolenaar
acc4b5648b
patch 8.2.4202: Vim9: cannot export function that exists globally
...
Problem: Vim9: cannot export function that exists globally.
Solution: When checking if a function already exists only check for
script-local functions. (closes #9615 )
2022-01-24 13:54:45 +00:00
Bram Moolenaar
b697dc295d
patch 8.2.4177: Vim9: autoload script not loaded after "vim9script noclear"
...
Problem: Vim9: autoload script not loaded after "vim9script noclear".
Solution: Check IMP_FLAGS_AUTOLOAD properly.
2022-01-22 11:27:29 +00:00
Bram Moolenaar
bed34f0a8a
patch 8.2.4147: E464 does not always include the offending command
...
Problem: E464 does not always include the offending command.
Solution: Add another error message with "%s". (closes #9564 )
2022-01-19 20:48:37 +00:00
Bram Moolenaar
38ecd97226
patch 8.2.4103: Vim9: variable declared in for loop not initialzed
...
Problem: Vim9: variable declared in for loop not initialzed.
Solution: Always initialze the variable. (closes #9535 )
2022-01-15 21:44:44 +00:00
Bram Moolenaar
f60a63485e
patch 8.2.4097: wrong number in error message on 32 bit system
...
Problem: Wrong number in error message on 32 bit system. (John Paul Adrian
Glaubitz)
Solution: Add type cast. (closes #9527 )
2022-01-15 14:16:37 +00:00
Bram Moolenaar
d9d2fd0aa3
patch 8.2.4086: "cctx" argument of find_func_even_dead() is unused
...
Problem: "cctx" argument of find_func_even_dead() is unused.
Solution: Remove the argument.
2022-01-13 21:15:21 +00:00
Bram Moolenaar
53c296112e
patch 8.2.4071: Vim9: no detection of return in try/endtry
...
Problem: Vim9: no detection of return in try/endtry. (Dominique Pellé)
Solution: Check if any of the blocks inside try/endtry did not end in
return.
2022-01-12 16:18:18 +00:00
Bram Moolenaar
17d36cbcd3
patch 8.2.4066: Vim9: imported autoload script loaded again
...
Problem: Vim9: imported autoload script loaded again.
Solution: Do not create a new imported_T every time.
2022-01-12 11:46:40 +00:00
Bram Moolenaar
577bd85d55
patch 8.2.4054: Vim9 script test fails
...
Problem: Vim9 script test fails.
Solution: Add missing change.
2022-01-10 18:42:52 +00:00
Bram Moolenaar
dc4451df61
patch 8.2.4050: Vim9: need to prefix every item in an autoload script
...
Problem: Vim9: need to prefix every item in an autoload script.
Solution: First step in supporting "vim9script autoload" and "import
autoload".
2022-01-09 21:36:37 +00:00
Yegappan Lakshmanan
782b43d894
patch 8.2.4045: some global functions are only used in one file
...
Problem: Some global functions are only used in one file.
Solution: Make the functions static. (Yegappan Lakshmanan, closes #9492 )
2022-01-08 18:43:40 +00:00
Bram Moolenaar
9f1a39a5d1
patch 8.2.4040: keeping track of allocated lines is too complicated
...
Problem: Keeping track of allocated lines in user functions is too
complicated.
Solution: Instead of freeing individual lines keep them all until the end.
2022-01-08 15:39:39 +00:00
Bram Moolenaar
d5f400c607
patch 8.2.4019: Vim9: import mechanism is too complicated
...
Problem: Vim9: import mechanism is too complicated.
Solution: Do not use the Javascript mechanism but a much simpler one.
2022-01-06 21:10:28 +00:00
Bram Moolenaar
58493cfae2
patch 8.2.4016: Vim9: incorrect error for argument that is shadowing var
...
Problem: Vim9: incorrect error for argument that is shadowing var.
Solution: Ignore variable that is not in block where the function was
defined.
2022-01-06 12:23:30 +00:00
Bram Moolenaar
d82a47dd04
patch 8.2.4012: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move the last error messages to errors.h.
2022-01-05 20:24:39 +00:00
Bram Moolenaar
d3a117814d
patch 8.2.4009: reading one byte beyond the end of the line
...
Problem: Reading one byte beyond the end of the line.
Solution: Check for NUL byte first.
2022-01-05 16:50:40 +00:00
Bram Moolenaar
10d6f18b2f
patch 8.2.3997: Vim9: not enough testing for extend() and map()
...
Problem: Vim9: not enough testing for extend() and map().
Solution: Add more test cases. Fix uncovered problems. Remove unused type
fields.
2022-01-04 15:54:38 +00:00
Bram Moolenaar
078a46161e
patch 8.2.3996: Vim9: type checking lacks information about declared type
...
Problem: Vim9: type checking for list and dict lacks information about
declared type.
Solution: Add dv_decl_type and lv_decl_type. Refactor the type stack to
store two types in each entry.
2022-01-04 15:17:03 +00:00
Bram Moolenaar
114dbda785
patch 8.2.3991: Vim9: error when extending dict<any>
...
Problem: Vim9: error when extending dict<any> with another type that it was
initialized with.
Solution: Also set the type for dict<any> if the initializer has a more
specific type. (closes #9461 )
2022-01-03 12:28:03 +00:00
Bram Moolenaar
74409f6279
patch 8.2.3970: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
2022-01-01 15:58:22 +00:00
Bram Moolenaar
e70cec9760
patch 8.2.3968: build failure
...
Problem: Build failure.
Solution: Add missing changes.
2022-01-01 14:25:55 +00:00
Bram Moolenaar
1a9922243a
patch 8.2.3957: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
2021-12-31 17:25:48 +00:00
Bram Moolenaar
9a015111a5
patch 8.2.3954: Vim9: no error for shadowing if script var is declared later
...
Problem: Vim9: no error for shadowing if script var is declared later.
Solution: Check argument names when compiling a function.
2021-12-31 14:06:45 +00:00