Currently, forwards and publics need to match exactly. Not just in type/const, but even in tags and names of variables. For example this is considered an error: (Look Code A)
There's really no reason why it should be. The callback will be called fine, because the shape is still correct. There's an argument that this can detect bugs when some parameters change, but the same isn't true for any other function type. This makes it almost impossible to do even minor things like correct spelling mistakes in headers. Different tags are also marked as an error: (Look Code B)
Minimal complete verifiable example (MCVE):
(Code A)
forward Func(a);
public Func(b)
{
}
(Code B)
forward Func(Tag:a);
public Func(a)
{
}
Tag mismatches are bad, but we already have a warning for them, which I believe should be used here as well.
Workspace Information:
Compiler version:
Command line arguments provided (or sampctl version):
(Posting on behalf of @Y-Less)
Issue description:
Error 25 should be less aggressive.
Currently, forwards and publics need to match exactly. Not just in type/const, but even in tags and names of variables. For example this is considered an error: (Look Code A)
There's really no reason why it should be. The callback will be called fine, because the shape is still correct. There's an argument that this can detect bugs when some parameters change, but the same isn't true for any other function type. This makes it almost impossible to do even minor things like correct spelling mistakes in headers. Different tags are also marked as an error: (Look Code B)
Minimal complete verifiable example (MCVE):
(Code A)
(Code B)
Tag mismatches are bad, but we already have a warning for them, which I believe should be used here as well.
Workspace Information: