Skip to content

expected table return value is not detecting missing fields #3383

@ChillerDragon

Description

@ChillerDragon
-- meta file describing lua to C++ plugin api

---@class Position
---@field x integer
---@field y integer

---@class CxxAbi
---@field get_pos fun(): Position
abi = {}

-- example lua plugin

function abi.get_pos()
	if false then
		return ""
	end
	return {
		missing = "fields"
	}
end
Image

I am trying to provide type hints for the callbacks that my users can implement. It checks the returned type but it does not warn if fields are missing in the returned type.

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