Skip to content

.luacheckrc alternative for LuaLS? #2934

Answered by tomlau10
Kein asked this question in Q&A
Discussion options

You must be logged in to vote
local AssetRegistryHelpers = nil ---@type UAssetRegistryHelpers
AssetRegistryHelpers = StaticFindObject("/Script/AssetRegistry.Default__AssetRegistryHelpers")

StaticFindObject returns UObject, which is super of UAssetRegistryHelpers down the line.

Ok~ so this is the line which causes the cast-local-type warning. An I think it is a true-positive, because as you said UObject is super of UAssetRegistryHelpers. And in general we cannot auto cast a superclass to a narrowed subclass.
=> LuaLS is working correctly in this case, agree?


Yeah, this works but now it ignores inherited functions, claiming they do not exist or making an overloaded one with argument to take full precedent.
...
has …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@Kein
Comment options

@tomlau10
Comment options

@Kein
Comment options

@tomlau10
Comment options

Answer selected by Kein
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants