---@generic annotation doesn't restrict types #1663
Labels
enhancement
New feature or request
feat/LuaCats Annotations
Related to Lua Language Server Annotations (LuaCats)
Milestone
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
---@Generic T:vector3|vector4 this annotation restrict types
Actual Behaviour
---@Generic T:vector3|vector4 this annotation does not restrict types, or i misunderstand something
Reproduction steps
---@Generic T:vector3|vector4
---@param v1 T first vector
---@param v2 T second vector
---@return T
function vmath.mul_per_elem(v1, v2) end
vmath.mul_per_elem("asd1", "asd") -- warning of wrong type using expected
Additional Notes
No response
Log File
No response
The text was updated successfully, but these errors were encountered: