Skip to content

Add a way of marking a function as overidable #1757

@AFCMS

Description

@AFCMS

Some engines/libraries let user override global functions, but then adding API headers for them gives a "duplicate field" warning.

eg

Header file for engine API:

--- Engine API
global_table = {}

---Overidable function
---@param test_data string
---@return boolean
function global_table.do_stuff(test_data) end

Code that use this engine:

--- Currently raises the duplicated field warning
function global_table.do_stuff(test_data)
    -- Handle stuff differently
end 

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions