Yegappan Lakshmanan
5bbcfbc4a2
patch 9.0.1824: Vim9: private members may be modifiable
...
Problem: Vim9: private members may be modifiable
Solution: prevent modification for def function
closes : #12963
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-30 16:40:33 +02:00
Ernie Rael
5c018bee0e
patch 9.0.1796: Vim9 problems with null_objects
...
Problem: Vim9 problems with null_objects
Solution: Vim9 improve null_object usage
Fix "xvar == null", where xvar might have been assigned null_object.
Fix compilation failure: "var o2: C = null_object".
closes : #12890
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-08-27 18:40:26 +02:00
Yegappan Lakshmanan
d4e4ecbb37
patch 9.0.1795: Indentation issues
...
Problem: Indentation issues
Solution: Fix code indentation issues.
closes : #12906
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-27 18:35:45 +02:00
Yegappan Lakshmanan
618e47d1cd
patch 9.0.1780: Vim9 type not defined during object creation
...
Problem: Vim9 type not defined during object creation
Solution: Define type during object creation and not during class
definition, parse mulit-line member initializers, fix lock
initialization
If type is not specified for a member, set it during object creation
instead of during class definition. Add a runtime type check for the
object member initialization expression
Also, while at it, when copying an object or class, make sure the lock
is correctly initialized.
And finally, parse multi-line member initializers correctly.
closes : #11957
closes : #12868
closes : #12869
closes : #12881
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-08-22 21:29:28 +02:00
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
h-east
2bd6a09691
patch 9.0.1569: cannot use "this.member" in lambda in class method
...
Problem: Cannot use "this.member" in lambda in class method.
Solution: Adjust check for reserved keyword. (Hirohito Higashi,
closes #12416 , closes #12076 , closes #12336 )
2023-05-19 19:01:17 +01:00
Bram Moolenaar
a2c0028fdf
patch 9.0.1558: wrong error for unreachable code after :throw
...
Problem: Wrong error for unreachable code after :throw.
Solution: Adjust the error message.
2023-05-14 22:05:15 +01:00
Bram Moolenaar
9d383f30bb
patch 9.0.1557: test failures for unreachable code
...
Problem: Test failures for unreachable code.
Solution: Add a test override to ignore unreachable code.
2023-05-14 21:38:12 +01:00
Bram Moolenaar
cf2610c82b
patch 9.0.1556: Vim9: error for missing "return" after "throw"
...
Problem: Vim9: error for missing "return" after "throw".
Solution: Set had_return flag for "throw". (closes #12262 )
2023-05-14 19:59:59 +01:00
zeertzjq
276410e78f
patch 9.0.1523: some error messages are not marked for translation
...
Problem: Some error messages are not marked for translation.
Solution: Surround the messages in _(). (closes #12356 )
2023-05-07 21:59:33 +01:00
Bram Moolenaar
22363c6994
patch 9.0.1483: += operator does not work on class member
...
Problem: += operator does not work on class member.
Solution: Do not skip as if "this." was used. (Christian Brabandt,
closes #12263 )
2023-04-24 17:15:25 +01:00
Bram Moolenaar
f39d9e9dca
patch 9.0.1479: small source file problems; outdated list of distrib. files
...
Problem: Small source file problems; outdated list of distributed files.
Solution: Small updates to source files and list of distributed files.
2023-04-22 22:54:40 +01:00
Bram Moolenaar
666cb9c530
patch 9.0.1340: Coverity warns for using NULL pointer
...
Problem: Coverity warns for using NULL pointer.
Solution: Check that lhs_type is not NULL.
2023-02-22 12:35:17 +00:00
Yegappan Lakshmanan
a23a11b5bf
patch 9.0.1336: functions without arguments are not always declared properly
...
Problem: Functions without arguments are not always declared properly.
Solution: Use "(void)" instead of "()". (Yegappan Lakshmanan, closes #12031 )
2023-02-21 14:27:41 +00:00
Bram Moolenaar
b1e32ac0c9
patch 9.0.1334: using tt_member for the class leads to mistakes
...
Problem: Using tt_member for the class leads to mistakes.
Solution: Add a separate tt_class field.
2023-02-21 12:38:51 +00:00
Bram Moolenaar
2c1c803c7e
patch 9.0.1322: crash when indexing "any" which is an object
...
Problem: Crash when indexing "any" which is an object.
Solution: Check the index is a number. Do not check the member type of an
object. (closes #12019 )
2023-02-18 18:38:37 +00:00
Bram Moolenaar
313e4724c3
patch 9.0.1292: :defer may call the wrong method for an object
...
Problem: :defer may call the wrong method for an object. (Ernie Rael)
Solution: When en object is from a class that extends or implements, figure
out the method to call at runtime. (closes #11910 )
2023-02-08 20:55:27 +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
b8bebd0cd7
patch 9.0.1265: using an interface method may give a compilation error
...
Problem: Using an interface method may give a compilation error.
Solution: Do not try to compile the body of a method of an interface.
(closes #11885 )
2023-01-30 20:24:23 +00:00
Yegappan Lakshmanan
142ed77898
patch 9.0.1246: code is indented more than necessary
...
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes #11887 )
2023-01-26 12:00:00 +00:00
Bram Moolenaar
486fc25a29
patch 9.0.1217: using an object member in a closure doesn't work
...
Problem: Using an object member in a closure doesn't work.
Solution: Initialize lv_loop_depth. (closes #11840 )
2023-01-18 14:51:07 +00:00
Bram Moolenaar
f7d1c6e188
patch 9.0.1211: storing value in interface member does not always work
...
Problem: Storing value in interface member does not always work.
Solution: Convert the index on the interface to the index on the object.
2023-01-16 20:47:57 +00:00
Bram Moolenaar
29ac5df37b
patch 9.0.1209: getting interface member does not always work
...
Problem: Getting interface member does not always work.
Solution: Convert the index on the interface to the index on the object.
(closes #11825 )
2023-01-16 19:43:47 +00:00
Bram Moolenaar
4cae845ce3
patch 9.0.1201: assignment with operator doesn't work in object method
...
Problem: Assignment with operator doesn't work in object method.
Solution: Handle loading the object member. (closes #11820 ) Add a few more
tests.
2023-01-15 15:51:48 +00:00
Bram Moolenaar
6aa0937fb8
patch 9.0.1179: not all errors around inheritance are tested
...
Problem: Not all errors around inheritance are tested.
Solution: Add more tests. Fix uncovered problems.
2023-01-11 17:59:38 +00:00
Bram Moolenaar
58b40092e6
patch 9.0.1178: a child class cannot override functions from a base class
...
Problem: A child class cannot override functions from a base class.
Solution: Allow overriding and implement "super".
2023-01-11 15:59:05 +00:00
Bram Moolenaar
554d031302
patch 9.0.1150: :interface is not implemented yet
...
Problem: :interface is not implemented yet.
Solution: Implement the basics of :interface.
2023-01-05 19:59:18 +00:00
Bram Moolenaar
574950dfb1
patch 9.0.1140: cannot call an object method in a compiled function
...
Problem: Cannot call an object method in a compiled function.
Solution: Compile the instructins to invoke an object method.
2023-01-03 19:08:50 +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
Bram Moolenaar
39c82ea656
patch 9.0.1130: unexpected output when autoloading a script
...
Problem: Unexpected output when autoloading a script for an interactive
operation.
Solution: Reset "KeyTyped" while loading a script and when handling a nested
function. (closes #11773 )
2023-01-02 13:08:01 +00:00
Bram Moolenaar
6acf757c6a
patch 9.0.1127: no error if function argument shadows class member
...
Problem: No error if function argument shadows class member.
Solution: Give an error for shadowing a class member.
2023-01-01 19:53:30 +00:00
Bram Moolenaar
c6951a76a5
patch 9.0.1108: type error when using "any" type and adding to float
...
Problem: Type error when using "any" type and adding a number to a float.
Solution: Accept both a number and a float. (closes #11753 )
2022-12-29 20:56:24 +00:00
Bram Moolenaar
f54cedd676
patch 9.0.1091: assignment to non-existing member causes a crash
...
Problem: Assignment to non-existing member causes a crash. (Yegappan
Lakshmanan)
Solution: Give an error message and bail out when a member cannot be found.
2022-12-23 17:56:27 +00:00
Bram Moolenaar
d505d17885
patch 9.0.1074: class members are not supported yet
...
Problem: Class members are not supported yet.
Solution: Add initial support for class members.
2022-12-18 21:42:55 +00:00
Bram Moolenaar
f593fc891c
patch 9.0.1055: Coverity warns for using uninitialized memory
...
Problem: Coverity warns for using uninitialized memory.
Solution: Clear the "lhs" field earlier.
2022-12-14 13:50:02 +00:00
Bram Moolenaar
65b0d16768
patch 9.0.1053: default constructor arguments are not optional
...
Problem: Default constructor arguments are not optional.
Solution: Use "= v:none" to make constructor arguments optional.
2022-12-13 18:43:22 +00:00
Bram Moolenaar
7ce7daf6cd
patch 9.0.1045: in a class object members cannot be initialized
...
Problem: In a class object members cannot be initialized.
Solution: Support initializing object members. Make "dissassemble" work on
an object method.
2022-12-10 18:42:12 +00:00
Bram Moolenaar
ffdaca9e6f
patch 9.0.1041: cannot define a method in a class
...
Problem: Cannot define a method in a class.
Solution: Implement defining an object method. Make calling an object
method work.
2022-12-09 21:41:48 +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
b775e72439
patch 9.0.0920: cannot find an import prefixed with "s:"
...
Problem: Cannot find an import prefixed with "s:". (Doug Kearns)
Solution: Skip over the "s:". (closes #11585 )
2022-11-22 18:12:44 +00:00
Bram Moolenaar
2435adf8eb
patch 9.0.0811: error if :echowin is preceded by a command modifier
...
Problem: Error if :echowin is preceded by a command modifier.
Solution: Do not give an error for range when there is a modifier.
(closes #11414 )
2022-10-21 12:05:46 +01:00
Bram Moolenaar
3558afe9e9
patch 9.0.0742: reading past end of the line when compiling a function
...
Problem: Reading past end of the line when compiling a function with
errors.
Solution: Do not return an invalid pointer. Fix skipping redirection.
2022-10-13 16:12:57 +01:00
Bram Moolenaar
a275f2cdcc
patch 9.0.0724: closure in compiled function gets same variable in block
...
Problem: Closure in compiled function gets same variable in block.
Solution: At the end of a block to not always reset the variable count.
(issue #11094 )
2022-10-11 20:04:09 +01:00
Bram Moolenaar
fcb86b0a99
patch 9.0.0689: compiler warning for unused function
...
Problem: Compiler warning for unused function.
Solution: Add #ifdef. (John Marriott)
2022-10-07 22:46:24 +01:00
Bram Moolenaar
2eae3d24d7
patch 9.0.0684: skipped :exe command fails compilation on MS-Windows
...
Problem: Skipped :exe command fails compilation on MS-Windows.
Solution: Adjust return value when skipping.
2022-10-07 15:09:27 +01:00
Bram Moolenaar
bdc09a18fc
patch 9.0.0683: cannot specify a time for :echowindow
...
Problem: Cannot specify a time for :echowindow.
Solution: A count can be used to specify the display time. Add
popup_findecho().
2022-10-07 14:31:45 +01:00
Bram Moolenaar
6586a01514
patch 9.0.0627: "const" and "final" both make the type a constant
...
Problem: "const" and "final" both make the type a constant. (Daniel
Steinberg)
Solution: Only have "const" make the type a constant.
2022-09-30 11:04:50 +01:00
Bram Moolenaar
fa1039760e
patch 9.0.0623: error for modifying a const is not detected at compile time
...
Problem: Error for modifying a const is not detected at compile time.
Solution: Add TTFLAG_CONST and check for it in add() and extend().
2022-09-29 19:14:42 +01:00
Bram Moolenaar
65449bd1ee
patch 9.0.0503: build failure
...
Problem: Build failure.
Solution: Add missing changes.
2022-09-19 16:02:43 +01:00
Bram Moolenaar
73e28dcc61
patch 9.0.0491: no good reason to build without the float feature
...
Problem: No good reason to build without the float feature.
Solution: Remove configure check for float and "#ifdef FEAT_FLOAT".
2022-09-17 21:08:33 +01:00