diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/definition/table.lua | 6 | ||||
-rw-r--r-- | test/hover/init.lua | 28 |
2 files changed, 33 insertions, 1 deletions
diff --git a/test/definition/table.lua b/test/definition/table.lua index ba2d2aa3..d63cc655 100644 --- a/test/definition/table.lua +++ b/test/definition/table.lua @@ -157,3 +157,9 @@ end local t = f() t.field1.<?x?> ]] + +TEST [[ +local t = { <!a!> } + +print(t[<?1?>]) +]] diff --git a/test/hover/init.lua b/test/hover/init.lua index 80f6009c..18482de5 100644 --- a/test/hover/init.lua +++ b/test/hover/init.lua @@ -818,7 +818,11 @@ local <?t?> = { } ]] [[ -local t: {} +local t: { + [1]: string = "aaa", + [2]: string = "bbb", + [3]: string = "ccc", +} ]] TEST [[ @@ -1638,3 +1642,25 @@ global a.b: { c: integer, } ]] + +TEST [[ +local <?t?> = { + 'a', 'b', 'c', + [10] = 'd', + x = 'e', + y = 'f', + ['z'] = 'g', + [3] = 'h', +} +]] +[[ +local t: { + x: string = "e", + y: string = "f", + z: string = "g", + [1]: string = "a", + [2]: string = "b", + [3]: string = "c"|"h", + [10]: string = "d", +} +]] |