You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---@classArray<T>: { [integer]:T }---@typeArray<string>localarr= {}
-- correctly warns that I am assigning a boolean to a stringarr[1] =false-- no warning despite indexing with a string instead of an integerarr["foo"] ="bar"-- correctly does not warn as I am following the type correctlyarr[3] ="Correct"
---@classDictionary<T>: { [string]:T }---@typeDictionary<boolean>localdict= {}
-- no warning despite indexing with a numberdict[1] ="incorrect"-- no warning despite assigning a stringdict["foo"] ="bar?"-- correctly does not warn as I am following the type correctlydict["correct"] =true
Activity
carsakiller commentedon Feb 20, 2023
Just some test cases:
GiuseppeIII commentedon Jun 25, 2023
Ran into this today as well 😞.
b0o commentedon Mar 31, 2024
Any update on this? This feature would be amazing!
A1steaksa commentedon Apr 20, 2024
This has cropped up as an issue that's making modularity difficult. Would love to see it fixed.
vaderkos commentedon Aug 31, 2025
Is there any fix for
Undefined type or aliasyet?Because it looks like it works correctly in type definitions:
Sampleeeee commentedon Oct 15, 2025
I am also experiencing this issue on arch, using neovim with the mason
lua-language-serverlanguage server.