sourcepawn-vscode icon indicating copy to clipboard operation
sourcepawn-vscode copied to clipboard

Code assistance breaks inside partial for loops inside methodmaps/enum structs

Open Alienmario opened this issue 8 months ago • 1 comments

Basic informations

  • OS: [Windows]
  • VSCode version: Latest
  • Extension version: 7.2.12

Further Information

If a for loop inside enum struct or methodmap method has less than 3 control parameters, code assistance will break for other methods or properties inside of it.


methodmap Foo
{
    public int bar()
    {
        for (;;)
        {
            return (this.GetVal() + this.prop);
            //              ^              ^
        }
    }

    public int GetVal()
    {
        return 1;
    }
    
    property int prop
    {
        public get()
        {
            return 1;
        }
    }
}

enum struct Foo2
{
    int val;

    int bar()
    {
        for (;;)
        {
            return (this.GetVal());
            //              ^
        }
    }

    int GetVal()
    {
        return this.val;
    }
}

Alienmario avatar Jun 12 '24 19:06 Alienmario