Merge pull request #87 from alliedmodders/bug-6174
Fix "static stock" not working (bug 6174).
This commit is contained in:
commit
b0bfec0f8f
@ -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;
|
||||
|
13
sourcepawn/compiler/tests/ok-static-stock.sp
Normal file
13
sourcepawn/compiler/tests/ok-static-stock.sp
Normal file
@ -0,0 +1,13 @@
|
||||
static stock Blah()
|
||||
{
|
||||
}
|
||||
|
||||
static stock void Blah2()
|
||||
{
|
||||
}
|
||||
|
||||
public main()
|
||||
{
|
||||
Blah();
|
||||
Blah2();
|
||||
}
|
Loading…
Reference in New Issue
Block a user