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

提案:一个project中的多个modules如果定义了相同class将会混淆 #408

Open
onlonely opened this issue Jan 27, 2021 · 0 comments

Comments

@onlonely
Copy link

Environment(环境)
EmmyLua version | [e.g. v1.3.5.194-IDEA203]
OS | [e.g. Windows 10]

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

1.假设我创建项目A,再添加模块B和C
2. 在模块B中有D.lua文件
---@class D local M = {} function M.call() print('B') end return M
3.在模块C中有D.lua文件
---@class D local M = {} function M.call() print('C') end return M

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

在模块C中有test.lua文件
local m = require("D") m.call()
此时ctrl+鼠标左键点击 call方法,跳转到的文件是模块B中的D.lua文件

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

一般情况下除了公共的lib都应该是归属模块级别的,就算一个project下多个module定义了相同class都不应该混淆

以上测试如果在java类型项目中就可以正常跳转到模块C中的D.lua文件

此问题会大量出现在某个lib在多个module中的时候,此时就要开启多个idea实例来编辑,才能不会跳转错误

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

1 participant