Skip to content

No errors when using stock on a variable with a name starting with @ #625

@Daniel-Cortez

Description

@Daniel-Cortez

Issue description:

The compiler issues error 042 (invalid combination of class specifiers) when specifier stock is used when defining a function whose name starts with @ (because such names imply public, and public functions can't be stock), but doesn't do the same for variables.

Minimal complete verifiable example (MCVE):

stock @Func(){} // error 042: invalid combination of class specifiers
stock @var = 0; // no errors/warnings

Workspace Information:

  • Compiler version: 3.2.3664, 3.10.10
  • Command line arguments provided (or sampctl version):
  • Operating System:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions