New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spcomp exits with no output for methodmap static function call #556
Comments
You can't forward declare (or use) methodmaps currently. In the future, run spcomp yourself if you have a problem like this because there is output, Sublime is just not showing it to you (though the output is hitting an assert). |
Aye, running Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2017 AlliedModders LLC and running
|
Oh, the asserts only show with debug builds, of course. It will just crash in release builds. The short term fix in SP for this is only to show an error saying methodmap A is yet undefined. Switch the order, unless you need them both to refer to each other. |
I have this on my todo list, but it is a bit tricky. In the first pass, any identifier that has not been seen is assumed to be a function. It's a reasonable assumption because functions aren't ordered, whereas variable declarations are. However this means the The quick fix to kill the assert would be to reject the methodmap if the symbol is already defined as a function or variable. A proper fix would be to implement support for out-of-order methodmaps. Instead of calling fetchfunc() in primary(), I would create a new iPLACEHOLDER symbol type, and allow transitions from iPLACEHOLDER to iFUNCTN or iMETHODMAP. I'll probably do the quick fix first just in case the proper fix doesn't work out. |
I can't reproduce this on master - I get an error message instead of a crash or assert. Properly supporting this kind of declaration will be a future thing. |
Help us help you
Environment
Description
Compiler exits prematurely with no errors or messages.
Problematic Code (or Steps to Reproduce)
Logs
Output from Sublime:
[Finished in 0.9s with exit code 3221225477]
or
[Finished in 0.8s]
Output from spcomp:
The text was updated successfully, but these errors were encountered: