]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.0673: Vim9: too recursive func calls when calling super-class method v9.1.0673
authorErnie Rael <errael@raelity.com>
Tue, 13 Aug 2024 21:27:22 +0000 (23:27 +0200)
committerChristian Brabandt <cb@256bit.org>
Tue, 13 Aug 2024 21:27:22 +0000 (23:27 +0200)
commit58c957943030b4dc551bf210b76cb2882182260c
tree32714fc474d0af2ad85f15885ab1cb114b65d89d
parentd33afe12c6639d70fca82230df6b9fdee7365423
patch 9.1.0673: Vim9: too recursive func calls when calling super-class method

Problem:  Vim9: too recursive func calls when calling super-class method
          with non-overriden super-call methods. (Aliaksei Budavei)
Solution: use interface method, when super is to be used (Ernie Rael)

When compiling "super.Func()" force class context to class that defines
function that is doing "super.Func()".
ISN_METHODCALL arg "cmf_is_super" for specific ufunc.

fixes: #15448
fixes: #15463 (2) super.method may not execute in context of defining
                  class
closes: #15477

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/proto/vim9instr.pro
src/testdir/test_vim9_class.vim
src/version.c
src/vim9.h
src/vim9execute.c
src/vim9expr.c
src/vim9instr.c