unexpected way to append to a list

9 views
Skip to first unread message

Ernie Rael

unread,
Oct 2, 2023, 4:51:51 PM10/2/23
to vim...@googlegroups.com

I was surprised that this works to append to a list

vim9script

var l2 = []
l2[0] = 3
echo l2

l2 = [1, 2, 3]
l2[3] = 4
echo l2

Unless a recent change introduced this bug, it probably shouldn't be fixed.

Should it be documented?

-ernie

Reply all
Reply to author
Forward
0 new messages