Skip to content

Generic Class: a method does not catch the type #3433

Description

@3lyrion
---@class Map<T>
Map = {}

---@param key T
---@return any?
function Map:Find(key) end

---@param key T
---@return boolean
function Map:Contains(key) end

---@param key T
function Map:Erase(key) end

function Map:Clear() end


---@class NumberMap: Map<number>
NumberMap = {}

---@return NumberMap
function NumberMap() end
local map = NumberMap()
map:Find(1)
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions