IntelliJ-Luanalysis
IntelliJ-Luanalysis copied to clipboard
No such member when using package.preload
Environment
name | version |
---|---|
IDEA version | GO2020.3 |
Luanalysis version | 1.2.2-IDEA203 |
OS | Linux |
What are the steps to reproduce this issue?
- Use package.preload to register a module
package.preload['mymodule'] = function()
-- ...
end
What happens?
Luanalysis raises the error "No such member 'mymodule' found on type table"
What were you expecting to happen?
No error :)
Any other comments?
This project is really awesome by the way. It's super cool to have something like this for Lua.
You also do require it, right? From your code sample:
local mymodule = require("mymodule")
This is in the context of an application that preloads these modules before running user scripts which require these modules. They're not required internally, no.