Sarrus1 / sourcepawn-studio

VSCode extension for SourcePawn scripting
https://sarrus1.github.io/sourcepawn-studio/
MIT License
140 stars 22 forks source link

Using const in Methodmap Setters Causes Intellisense Error #356

Closed Scags closed 3 months ago

Scags commented 8 months ago

Basic informations

Further Information

Using 'const' when declaring a methodmap setter causes the intellisense to fuss. This is legal in SP, albeit not commonly done, and compiles just fine.

To Reproduce

image

Code to reproduce the behaviour

int g_Val;
methodmap SomeMM
{
    property int SomeVal
    {
        public get() { return g_Val; }
        public set(const int val) { g_Val = val; }
    }
}
Sarrus1 commented 8 months ago

Fixed in the grammar here. Waiting for the feat/salsa branch to be merged to implement the fix.

Thanks for reporting!