Skip to content

Stackoverflow #1003

Closed
Closed

Description

@CppCXY
Image

Activity

  1. CppCXY commented on Apr 2, 2026

    @CppCXY
    MemberAuthor

    reproduce example:

    ---@class Base
    local base = {}
    function base:iter()
        return pairs(self)
    end
    
    ---@generic T
    ---@param e T
    ---@return T | Base
    function Enum(e)
    end
    
    
    local Event = Enum {
    
        A = 1,
    
        B = 2,
    
        C = 3,
    
        D = 4,
    
        E = 5,
    
        F = 6,
    }
    
    for k, v in Event:iter() do
        if 1 == v then
            return true
        end
    end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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