pawn-lang / compiler

Pawn compiler for SA-MP with bug fixes and new features - runs on Windows, Linux, macOS
Other
301 stars 71 forks source link

Double-declare natives #703

Open Y-Less opened 2 years ago

Y-Less commented 2 years ago

Issue description:

This is valid code:

forward Func(); // Muscle-memory made me type "foreach" at first here.
forward Func();

This isn't:

native Func();
native Func();

I can't really see any reason why declaring the same native identically twice should be an issue. Obviously declaring it differently is bad, but not the same. There are still open issues relating to forwards that are almost the same (can't find the issue/PR, but there was a discussion about forward Func(a); forward Func(b); being an error), so I don't know how that would apply here.

Minimal complete verifiable example (MCVE):

Workspace Information: