We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this
(Before the failing class examples, I have included a couple of working class examples named TestPassing*.)
TestPassing*
Example 1:
vim9script class TestPassing1 const one: number = TestPassing1.One(this) static def One(that: TestPassing1): number return 1 enddef endclass echo TestPassing1.One(TestPassing1.new()) class TestPassing2 const one: number = 1 const two: number = TestPassing2.Two(this) static def Two(that: TestPassing2): number return that.one + 1 enddef endclass echo TestPassing2.Two(TestPassing2.new()) class Test2 const two: number = Test2.Two(this) const one: number = 1 static def Two(that: Test2): number return that.one + 2 enddef endclass # E340 echo Test2.Two(Test2.new())
Example 2:
vim9script class TestPassing1 const Id: func(any): any = ((_) => (v) => v)(this) static def Id(that: TestPassing1): func(any): any return that.Id enddef endclass echo TestPassing1.Id(TestPassing1.new())(1) echo TestPassing1.new().Id(1) class Test1 const Id: func(any): any = ((that) => (_) => that)(this) static def Id(that: Test1): func(any): any return that.Id enddef endclass # E340 const Id0: func(any): any = Test1.Id(Test1.new()) # E340 const Id1: func(any): any = Test1.new().Id class Test2 const Id: any = Test2.Id(this) static def Id(that: Test2): any return that.Id enddef endclass # E340 const Id2: any = Test2.Id(Test2.new()) # E340 const Id3: any = Test2.new().Id
Each failure can probably be justified on the grounds of interfering with step 2.
vim/runtime/doc/vim9class.txt
Lines 259 to 263 in 3fa8f77
Do we need a dedicated EXXX for an inappropriate state?
v9.1.0263
GNU/Linux Debian (testing/trixie)
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Steps to reproduce
(Before the failing class examples, I have included a couple
of working class examples named
TestPassing*
.)Example 1:
Example 2:
Expected behaviour
Each failure can probably be justified on the grounds of
interfering with step 2.
vim/runtime/doc/vim9class.txt
Lines 259 to 263 in 3fa8f77
Do we need a dedicated EXXX for an inappropriate state?
Version of Vim
v9.1.0263
Environment
GNU/Linux Debian (testing/trixie)
Logs and stack traces
No response
The text was updated successfully, but these errors were encountered: