summaryrefslogtreecommitdiff
path: root/src/evalvars.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 8.2.3216: Vim9: crash when using variable in a loop at script levelv8.2.3216Bram Moolenaar2021-07-251-7/+1
| | | | | | | 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)
* patch 8.2.3211: Vim9: argument types are not checked at compile timev8.2.3211Yegappan Lakshmanan2021-07-241-0/+11
| | | | | | Problem: Vim9: argument types are not checked at compile time. Solution: Add several more type checks. Fix type check for matchaddpos(). (Yegappan Lakshmanan, closes #8619)
* patch 8.2.3201: crash in testv8.2.3201Bram Moolenaar2021-07-221-3/+2
| | | | | Problem: Crash in test. Solution: Initialize "where".
* patch 8.2.3197: error messages are spread outv8.2.3197Bram Moolenaar2021-07-211-2/+3
| | | | | Problem: Error messages are spread out. Solution: Move a few more error messages to errors.h.
* patch 8.2.3188: Vim9: argument types are not checked at compile timev8.2.3188Yegappan Lakshmanan2021-07-201-0/+32
| | | | | | Problem: Vim9: argument types are not checked at compile time. Solution: Add several more type checks, also at runtime. (Yegappan Lakshmanan, closes #8587)
* patch 8.2.3186: Vim9: not all failures for import testedv8.2.3186Bram Moolenaar2021-07-191-4/+11
| | | | | Problem: Vim9: not all failures for import tested Solution: Test more import failures
* patch 8.2.3180: Vim9: memory leak when concatenating to an imported stringv8.2.3180Bram Moolenaar2021-07-181-14/+19
| | | | | Problem: Vim9: memory leak when concatenating to an imported string. Solution: Clear the destination.
* patch 8.2.3179: Vim9: cannot assign to an imported variable at script levelv8.2.3179Bram Moolenaar2021-07-181-132/+162
| | | | | Problem: Vim9: cannot assign to an imported variable at script level. Solution: Lookup imported items when assigning.
* patch 8.2.3152: Vim9: accessing "s:" results in an errorv8.2.3152Bram Moolenaar2021-07-111-1/+2
| | | | | Problem: Vim9: accessing "s:" results in an error. Solution: Do not try to lookup a script variable for "s:". (closes #8549)
* patch 8.2.3129: Vim9: imported uninitialized list does not get type checkedv8.2.3129Bram Moolenaar2021-07-081-6/+7
| | | | | Problem: Vim9: imported uninitialized list does not get type checked. Solution: Get type from imported variable.
* patch 8.2.3128: Vim9: uninitialzed list does not get type checkedv8.2.3128Bram Moolenaar2021-07-081-1/+19
| | | | | Problem: Vim9: uninitialzed list does not get type checked. Solution: Set the type when initializing the variable. (closes #8529)
* patch 8.2.3069: error messages are spread outv8.2.3069Bram Moolenaar2021-06-271-4/+4
| | | | | Problem: Error messages are spread out. Solution: Move some error messages to errors.h. Use clearer names.
* patch 8.2.2998: Vim9: disassemble test failsv8.2.2998Bram Moolenaar2021-06-141-6/+10
| | | | | Problem: Vim9: disassemble test fails. Solution: Add missing call to lookup_debug_var().
* patch 8.2.2975: Vim9: can only use an autoload function name as a stringv8.2.2975Bram Moolenaar2021-06-111-2/+3
| | | | | Problem: Vim9: can only use an autoload function name as a string. Solution: Load the autoload script when encountered. (closes #8124)
* patch 8.2.2969: subtracting from number option fails when result is zerov8.2.2969Bram Moolenaar2021-06-101-0/+1
| | | | | | | Problem: Subtracting from number option fails when result is zero. (Ingo Karkat) Solution: Reset the string value when using the numeric value. (closes #8351)
* patch 8.2.2842: Vim9: skip argument to searchpair() is not compiledv8.2.2842Bram Moolenaar2021-05-071-0/+1
| | | | | Problem: Vim9: skip argument to searchpair() is not compiled. Solution: Add VAR_INSTR.
* patch 8.2.2785: Vim9: cannot redirect to local variablev8.2.2785Bram Moolenaar2021-04-191-3/+37
| | | | | Problem: Vim9: cannot redirect to local variable. Solution: Compile :redir when redirecting to a variable.
* patch 8.2.2781: add() silently skips when adding to null list or blobv8.2.2781Bram Moolenaar2021-04-181-0/+6
| | | | | | Problem: Add() silently skips when adding to null list or blob. Solution: Give an error in Vim9 script. Allocate blob when it is NULL like with list and dict.
* patch 8.2.2763: Vim9: cannot use type in for loop unpack at script levelv8.2.2763Bram Moolenaar2021-04-141-1/+1
| | | | | Problem: Vim9: cannot use type in for loop unpack at script level. Solution: Advance over the type name.
* patch 8.2.2760: Vim9: no error for changing a for loop variablev8.2.2760Bram Moolenaar2021-04-131-7/+20
| | | | | Problem: Vim9: no error for changing a for loop variable. Solution: Make the loop variable read-only. (issue #8102)
* patch 8.2.2753: Vim9: cannot ignore an item in assignment unpackv8.2.2753Bram Moolenaar2021-04-101-5/+7
| | | | | Problem: Vim9: cannot ignore an item in assignment unpack. Solution: Allow using an underscore.
* patch 8.2.2744: Vim9: no way to explicitly ignore an argumentv8.2.2744Bram Moolenaar2021-04-101-0/+5
| | | | | Problem: Vim9: no way to explicitly ignore an argument. Solution: Use the underscore as the name for an ignored argument.
* patch 8.2.2681: Vim9: test fails for redeclaring script variablev8.2.2681Bram Moolenaar2021-03-311-6/+7
| | | | | Problem: Vim9: test fails for redeclaring script variable. Solution: It's OK to assign to an existing script variable in legacy.
* patch 8.2.2680: Vim9: problem defining a script variable from legacy functionv8.2.2680Bram Moolenaar2021-03-311-4/+6
| | | | | | Problem: Vim9: problem defining a script variable from legacy function. Solution: Check if the script is Vim9, not the current syntax. (closes #8032)
* patch 8.2.2673: Vim9: script-local funcref can have lower case namev8.2.2673Bram Moolenaar2021-03-281-2/+4
| | | | | Problem: Vim9: script-local funcref can have lower case name. Solution: Require an upper case name.
* patch 8.2.2660: Vim9: no error for declaration with trailing textv8.2.2660Bram Moolenaar2021-03-261-2/+5
| | | | | Problem: Vim9: no error for declaration with trailing text. Solution: Give an error. (closes #8014)
* patch 8.2.2603: Vim9: no effect if user command is also a functionv8.2.2603Bram Moolenaar2021-03-141-10/+20
| | | | | Problem: Vim9: no effect if user command is also a function. Solution: Check for paren following. (closes #7960)
* patch 8.2.2597: Vim9: "import * as" does not work at script levelv8.2.2597Bram Moolenaar2021-03-131-12/+28
| | | | | Problem: Vim9: "import * as" does not work at script level. Solution: Implement using an imported namespace.
* patch 8.2.2579: Vim9: crash in garbagecollect after for loopv8.2.2579Bram Moolenaar2021-03-081-1/+2
| | | | | | Problem: Vim9: crash in garbagecollect after for loop. Solution: Do not set a reference in script item when the name was cleared. (closes #7935)
* patch 8.2.2567: Vim9: no error if variable is defined for existing functionv8.2.2567Bram Moolenaar2021-03-041-1/+10
| | | | | Problem: Vim9: no error if variable is defined for existing function. Solution: Check if name isn't already in use. (closes #7897)
* patch 8.2.2566: Vim9: Function name is not recognizedv8.2.2566Bram Moolenaar2021-03-031-3/+20
| | | | | | Problem: Vim9: Function name is not recognized. Solution: Change lookup_scriptvar() to also find function names. (closes #7770)
* patch 8.2.2533: Vim9: cannot use a range with :unletv8.2.2533Bram Moolenaar2021-02-201-21/+40
| | | | | Problem: Vim9: cannot use a range with :unlet. Solution: Implement ISN_UNLETRANGE.
* patch 8.2.2526: build failurev8.2.2526Bram Moolenaar2021-02-171-1/+0
| | | | | Problem: Build failure. Solution: Change lookup_scriptvar() arguments.
* patch 8.2.2501: not always clear where an error is reportedv8.2.2501Bram Moolenaar2021-02-111-12/+22
| | | | | Problem: Not always clear where an error is reported. Solution: Add the where_T structure and pass it around. (closes #7796)
* patch 8.2.2395: Vim9: error for wrong type may report wrong line numberv8.2.2395Bram Moolenaar2021-01-231-0/+7
| | | | | | Problem: Vim9: error for wrong type may report wrong line number. Solution: Save and restore the line number when evaluating the expression. (closes #7727)
* patch 8.2.2388: no easy way to get the maximum or mininum number valuev8.2.2388Bram Moolenaar2021-01-211-0/+4
| | | | | Problem: No easy way to get the maximum or mininum number value. Solution: Add v:numbermax and v:numbermin.
* patch 8.2.2381: Vim9: divide by zero does not abort expression executionv8.2.2381Bram Moolenaar2021-01-211-2/+4
| | | | | Problem: Vim9: divide by zero does not abort expression execution. Solution: Use a "failed" flag. (issue #7704)
* patch 8.2.2372: confusing error message for wrong :let commandv8.2.2372Bram Moolenaar2021-01-171-3/+4
| | | | | Problem: Confusing error message for wrong :let command. Solution: Only check for type in Vim9 script.
* patch 8.2.2371: Vim9: crash when using types in :for with unpackv8.2.2371Bram Moolenaar2021-01-171-4/+7
| | | | | | Problem: Vim9: crash when using types in :for with unpack. Solution: Check for skip_var_list() failing. Pass include_type to skip_var_one(). Skip type when compiling. (closes #7694)
* patch 8.2.2341: expresison command line completion incomplete after "g:"v8.2.2341Bram Moolenaar2021-01-131-1/+1
| | | | | | Problem: Expresison command line completion shows variables but not functions after "g:". (Gary Johnson) Solution: Prefix "g:" when needed to a global function.
* patch 8.2.2331: Vim9: wrong error when modifying dict declared with :finalv8.2.2331Bram Moolenaar2021-01-111-2/+2
| | | | | | Problem: Vim9: wrong error when modifying dict declared with :final. Solution: Do not check for writable variable when an index follows. (closes #7657)
* patch 8.2.2306: Vim9: when using function reference type is not checkedv8.2.2306Bram Moolenaar2021-01-061-6/+4
| | | | | | Problem: Vim9: when using function reference type is not checked. Solution: When using a function reference lookup the type and check the argument types. (issue #7629)
* patch 8.2.2297: Vim9: cannot set 'number' to a boolean valuev8.2.2297Bram Moolenaar2021-01-041-2/+8
| | | | | Problem: Vim9: cannot set 'number' to a boolean value. Solution: Use tv_get_bool(). (closes #7615)
* patch 8.2.2291: Vim9: cannot use "null" for v:nullv8.2.2291Bram Moolenaar2021-01-031-1/+1
| | | | | Problem: Vim9: cannot use "null" for v:null. Solution: Support "null" like "true" and "false". (closes #7495)
* patch 8.2.2285: Vim9: cannot set an option to a falsev8.2.2285Bram Moolenaar2021-01-031-3/+9
| | | | | Problem: Vim9: cannot set an option to a false. Solution: For VAR_BOOL use string "0". (closes #7603)
* patch 8.2.2284: Vim9: cannot set an option to a boolean valuev8.2.2284Bram Moolenaar2021-01-031-1/+3
| | | | | Problem: Vim9: cannot set an option to a boolean value. Solution: Check for VAR_BOOL. (closes #7603)
* patch 8.2.2272: Vim9: extend() can violate the type of a variablev8.2.2272Bram Moolenaar2021-01-021-4/+12
| | | | | | 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)
* patch 8.2.2268: Vim9: list unpack seen as declarationv8.2.2268Bram Moolenaar2021-01-011-9/+17
| | | | | Problem: Vim9: list unpack seen as declaration. Solution: Check for "var". (closes #7594)
* patch 8.2.2267: Vim9: cannot use unlet for a dict memberv8.2.2267Bram Moolenaar2021-01-011-1/+1
| | | | | Problem: Vim9: cannot use unlet for a dict member. Solution: Pass GLV_NO_DECL to get_lval(). (closes #7585)
* patch 8.2.2266: Vim9: it can be hard to see where white space is missingv8.2.2266Bram Moolenaar2021-01-011-1/+2
| | | | | Problem: Vim9: it can be hard to see where white space is missing. Solution: Mention the text where the error was seen. (closes #7580)