0
0
mirror of https://github.com/vim/vim.git synced 2025-10-06 05:44:14 -04:00

patch 9.0.1758: vim9 no class identifiers in stack dumps

Problem:  vim9 no class identifiers in stack dumps
Solution: Prefix class members in stack traces with the class name
          followed by a dot.

closes: #12866
closes: #12078

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
This commit is contained in:
LemonBoy
2023-08-20 18:09:11 +02:00
committed by Christian Brabandt
parent 4b1cc7906f
commit 0ffc17aa47
3 changed files with 51 additions and 21 deletions

View File

@@ -2492,4 +2492,27 @@ def Test_multi_level_member_access()
v9.CheckScriptSuccess(lines)
enddef
" Test expansion of <stack> with class methods.
def Test_stack_expansion_with_methods()
var lines =<< trim END
vim9script
class C
def M1()
F0()
enddef
endclass
def F0()
assert_match('<SNR>\d\+_F\[1\]\.\.C\.M1\[1\]\.\.<SNR>\d\+_F0\[1\]$', expand('<stack>'))
enddef
def F()
C.new().M1()
enddef
F()
END
v9.CheckScriptSuccess(lines)
enddef
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker