[vim/vim] Allow using class members from lambda inside a object method (PR #19041)

1 view
Skip to first unread message

Foxe Chen

unread,
5:14 AM (6 hours ago) 5:14 AM
to vim/vim, Subscribed

Before this wouldn't work:

vim9script

class A
    static var value: string

    static def _Method(): void
        echom A.value
    enddef

    def new()
        var Something: func = () => {
            A.value = "hey"
            A._Method()
        }

        Something()
    enddef
endclass

var obj: object<A> = A.new()

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19041

Commit Summary

  • b42f11b allow using class members from lambda

File Changes

(3 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19041@github.com>

Reply all
Reply to author
Forward
0 new messages