-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix handling of expression types #7
base: tarcv-master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to branch fixes3, also tested against tarcv-master, which results in the same outcome.
Expression expr (this, m_lexer, TYPE_ToBeDecided); | ||
ASSERT_NE(expr.getResult()->valueType(), TYPE_ToBeDecided) | ||
if (expr.getResult()->valueType() != reqtype) { | ||
error("Incompatible data type"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error: crashbot.botc:64:near 51: Incompatible data type
if (ChatSectionExistsInChatLump("WinStrings")) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try botc_defs.bts
from this branch. 1060356 requires if
"argument" to be boolean. (This is what Java does and I think such behavior is more friendly to Doom modders)
When an actual int returning function is used as if
argument, you need to rewrite it like if (func() != 0)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something I noticed, although I don't know if you would consider it a bug. The compiler complains if the logical operator is used in an int (let's suppose it is named $local1) like $local1 = !($local1)
. Still converting the source code for the new defs, so far no real issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It compiled and works with the Roam() fix, here is the script I've used http://sprunge.us/v4r7jN.
Fix handling of expression types
Additional fixes for CI: