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

Report problems with documented functionality
User avatar
Flipeador
Posts: 1204
Joined: 15 Nov 2014, 21:31
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: 9593
Joined: 30 Sep 2013, 04:07
Contact:

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: niCode and 36 guests