Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias: No usages found in Project and Libraries #550

Open
nfet opened this issue Jun 8, 2023 · 1 comment
Open

Alias: No usages found in Project and Libraries #550

nfet opened this issue Jun 8, 2023 · 1 comment

Comments

@nfet
Copy link

nfet commented Jun 8, 2023

Environment(环境)

name version
IDEA version 2023.1.2
EmmyLua version 1.4.3-IDEA231
OS MacOS Ventura 13.4

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

  1. See Given Example Alias Class Structure Below
--- @class A
local A = {
    methodA = function()  end
}

--- @class B
local B = {
    methodB = function()  end
}
--- @alias AB A|B

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

--- @type AB
local o = {}

o.methodA()
o.methodB()

Main Bug:

  1. Mouse or cursor on o.methodA() and use Go to Declaration or Usages (CMD + Click or CMD+B) on the o.methodA()
    • Result: Works as Expected
  2. Mouse or cursor on o.methodB() and use Go to Declaration or Usages (CMD + Click or CMD+B) on the o.methodB()
    • Result: Renders "No usages found in Project and Libraries"

Alternate Event:

Switch alias to B occurring first before A

--- @alias AB B|A

Then Go to Declaration on o.methodA() no longer works and o.methodB() works because it's declared first on the alias. It seems that the "Go to Declaration or Usages" is only honoring the first alias and ignores all others.

  1. Mouse or cursor on o.methodA() and use Go to Declaration or Usages (CMD + Click or CMD+B) on the o.methodA()
    • Result: Renders "No usages found in Project and Libraries"
  2. Mouse or cursor on o.methodB() and use Go to Declaration or Usages (CMD + Click or CMD+B) on the o.methodB()
    • Result: Works as Expected

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

  • none

Any other comments?(其它说明)

@Shinzuh
Copy link

Shinzuh commented Jun 13, 2023

Got the same problem, had to downgrade to IntelliJ-EmmyLua-1.3.11-IDEA231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants