mirror of
https://github.com/vim/vim.git
synced 2025-10-03 05:14:07 -04:00
patch 9.0.1211: storing value in interface member does not always work
Problem: Storing value in interface member does not always work. Solution: Convert the index on the interface to the index on the object.
This commit is contained in:
@@ -876,14 +876,14 @@ def Test_class_implements_interface()
|
||||
vim9script
|
||||
|
||||
interface Result
|
||||
this.label: string
|
||||
public this.label: string
|
||||
this.errpos: number
|
||||
endinterface
|
||||
|
||||
# order of members is opposite of interface
|
||||
class Failure implements Result
|
||||
this.errpos: number = 42
|
||||
this.label: string = 'label'
|
||||
public this.label: string = 'label'
|
||||
endclass
|
||||
|
||||
def Test()
|
||||
@@ -891,6 +891,10 @@ def Test_class_implements_interface()
|
||||
|
||||
assert_equal('label', result.label)
|
||||
assert_equal(42, result.errpos)
|
||||
|
||||
result.label = 'different'
|
||||
assert_equal('different', result.label)
|
||||
assert_equal(42, result.errpos)
|
||||
enddef
|
||||
|
||||
Test()
|
||||
|
Reference in New Issue
Block a user