This fixes :endclass, :endenum, and :endinterface from giving errors, which appears to have been unintentional. [The errors currently, with screenshots, and discussion on the matter can be found in #20191]
The test file src/testdir/test_vim9_class.vim is updated to test these as well as adding basic tests for enum and interface. They are also in 20191, which can easily be aligned after this PR is merged.
https://github.com/vim/vim/pull/20253
(2 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@dkearns commented on this pull request.
In src/vim9class.c:
> if (checkforcmd(&p, end_name, shortlen))
{
- if (STRNCMP(line, end_name, fullen) != 0)
+ if (STRNCMP(cmd_start, end_name, fullen) != 0)
semsg(_(e_command_cannot_be_shortened_str), line);
cmd_start for the error message to exclude any leading context.—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Thanks, this was little irksome. :)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Thanks, this was little irksome. :)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@kennypete pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@kennypete commented on this pull request.
In src/vim9class.c:
> if (checkforcmd(&p, end_name, shortlen))
{
- if (STRNCMP(line, end_name, fullen) != 0)
+ if (STRNCMP(cmd_start, end_name, fullen) != 0)
semsg(_(e_command_cannot_be_shortened_str), line);
Fixed, and tests have been added for them, which run clean. I also added tests with colon+whitespace variants, which revealed :public gives E1065, though that can wait for another day (and the test has a TODO and : public commented).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()