[v2] __Enum Method - NumberOfVars is always equal to 2 Topic is solved

Report problems with documented functionality
User avatar
Flipeador
Posts: 1146
Joined: 15 Nov 2014, 21:31
GitHub: Flipeador
Location: Argentina
Contact:

[v2] __Enum Method - NumberOfVars is always equal to 2

29 Sep 2019, 07:44

Code: Select all

class IColor
{
    __New() => MsgBox("Constructor")
    __Enum(NumberOfVars)
    {
        MsgBox("NumberOfVars: " . NumberOfVars)
        return (*) => A_Index < 2
    }
}


Color := IColor.New()
for k, v in Color
    MsgBox("k,v")

for k in Color
    MsgBox("k")
lexikos
Posts: 6652
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: [v2] __Enum Method - NumberOfVars is always equal to 2

29 Sep 2019, 19:08

Since you've only posted code and an observation, and no request or anything else, I assume you realize this is a bug. Thanks for posting it, though I would prefer legitimate Bug Reports to be filed under the appropriate forum (I've moved the topic).

It's a bit hard to find the relevant documentation, and the direct call example under For is incorrect. I'll fix those too.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 7 guests