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
Source this script:
vim9script class Foo this.x: number def Add(n: number) this.x += n enddef endclass var f = Foo.new(1) f.Add(41) echo f.x
This results in E909: Cannot index a special variable. A workaround consists in changing the assignment inside Add() into this.x = this.x + n.
E909: Cannot index a special variable
Add()
this.x = this.x + n
No error should be raised and the output should be 42.
42
9.0.1198
macOS 13.1 Apple Terminal xterm-256color ZSH 5.8.1
No response
The text was updated successfully, but these errors were encountered:
4cae845
No branches or pull requests
Steps to reproduce
Source this script:
This results in
E909: Cannot index a special variable
. A workaround consists in changing the assignment insideAdd()
intothis.x = this.x + n
.Expected behaviour
No error should be raised and the output should be
42
.Version of Vim
9.0.1198
Environment
macOS 13.1
Apple Terminal
xterm-256color
ZSH 5.8.1
Logs and stack traces
No response
The text was updated successfully, but these errors were encountered: