Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force a reparse when encountering a late forward
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 -----
- Loading branch information