You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This hopefully fixes a bug where code for a custom assignment operator
wasn't being generated because the compiler thought that it's not used
but it still generated a call (which resulting in infinite recursion).
It happened only if some function returned a tagged result and wasn't
forwarded before its first use. Interestingly the compiler didn't issue
a reparse when it encountered the forward declaration and no warning
was printed. Perhaps the authors forgot to do this when they were adding
the forward syntax (it certainly was added after what is now called
"old-style prototypes").
See 8) here: http://forum.sa-mp.com/showthread.php?t=355877
--------- test code --------
#include <a_samp>
_:operator=(Taggg:a)
{
return _:a + 5;
}
main()
{
new a = d();
printf("%d", a);
}
forward Taggg:d();
Taggg:d()
{
return Taggg:5;
}
----- end of test code -----
0 commit comments