From c22679b21f0ed689dc269d49f05712fada02f7ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 15 Jul 2021 20:04:42 +0800 Subject: resolve #589 --- test/completion/init.lua | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'test') diff --git a/test/completion/init.lua b/test/completion/init.lua index 69241afd..9c87ab33 100644 --- a/test/completion/init.lua +++ b/test/completion/init.lua @@ -2615,3 +2615,53 @@ f(fun$) kind = define.CompletionItemKind.Snippet, } } + +TEST [[ +---@type {[1]: number} +local t + +t.$ +]] +{ + { + label = '1', + kind = define.CompletionItemKind.Field, + textEdit = { + newText = '[1]', + start = 35, + finish = 34, + }, + additionalTextEdits = { + { + start = 34, + finish = 34, + newText = '', + }, + }, + } +} + +TEST [[ +---@type {[1]: number} +local t + +t.$ +]] +{ + { + label = '1', + kind = define.CompletionItemKind.Field, + textEdit = { + newText = '[1]', + start = 35, + finish = 34, + }, + additionalTextEdits = { + { + start = 34, + finish = 34, + newText = '', + }, + }, + } +} -- cgit v1.2.3