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

Truncated function name "symbol already defined" #691

Closed AbyssMorgan closed 2 years ago

AbyssMorgan commented 2 years ago

Issue description:

Minimal complete verifiable example (MCVE):

stock Tryg3D_GetDistanceFromPointToLine(){

}

stock Tryg3D_GetDistanceFromPointToLineEx(){

}

When we reach 31 characters in function name and name are similar after truncated we get error "symbol already defined"

Workspace Information:

Y-Less commented 2 years ago

That's true, but I'm not sure what else could happen here. The maximum function length is the length that the internal arrays are defined as, so those are both stored internally as Tryg3D_GetDistanceFromPointToLi. The extra data is lost - this is why there's a truncation warning, warnings are saying "this code is probably wrong", so IMHO the warning is really the only reasonable solution here.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity.