diff --git a/sourcepawn/compiler/sc1.c b/sourcepawn/compiler/sc1.c index 5ff514de..2a90ee79 100644 --- a/sourcepawn/compiler/sc1.c +++ b/sourcepawn/compiler/sc1.c @@ -1488,6 +1488,9 @@ static void dodecl(const token_t *tok) int fstock = (tok->id == tSTOCK); int fstatic = (tok->id == tSTATIC); + if (fstatic && matchtoken(tSTOCK)) + fstock = TRUE; + int flags = DECLFLAG_MAYBE_FUNCTION | DECLFLAG_VARIABLE | DECLFLAG_ENUMROOT; if (tok->id == tNEW) flags |= DECLFLAG_OLD; diff --git a/sourcepawn/compiler/tests/ok-static-stock.sp b/sourcepawn/compiler/tests/ok-static-stock.sp new file mode 100644 index 00000000..73516697 --- /dev/null +++ b/sourcepawn/compiler/tests/ok-static-stock.sp @@ -0,0 +1,13 @@ +static stock Blah() +{ +} + +static stock void Blah2() +{ +} + +public main() +{ + Blah(); + Blah2(); +}