IntelliJ-EmmyLua icon indicating copy to clipboard operation
IntelliJ-EmmyLua copied to clipboard

Table value types forgotten when defined in function call

Open thedaneeffect opened this issue 3 years ago • 1 comments

Environment(环境)

name version
IDEA version GoLand 2021.1.1
EmmyLua version 1.3.6.215-IDEA211
OS Windows 10

What are the steps to reproduce this issue?(重现步骤?)

  1. Define
---@alias MyTable table<string, fun(arg1:number, arg2:string)>

---@param a MyTable
function test(a) end
  1. Write function call with table using autofill
test({
	["test"] = function()  end -- does not auto fill here or know what type ["test"] is
})

What happens?(出现什么问题?)

Autofill is not aware of value type. image

What were you expecting to happen?(期望?)

image

Any logs, error output, etc?(有没有什么log, error输出?)

No

Any other comments?(其它说明)

This removes the capability of function parameter types when used as specified in the reproduction section.

thedaneeffect avatar May 06 '21 19:05 thedaneeffect

I hate to pull the "use the fork" card, but you might have more luck on https://github.com/Benjamin-Dobell/IntelliJ-Luanalysis until it's fixed here.

adriweb avatar May 06 '21 19:05 adriweb