Internals: Use dtype functions; changes to integer to match spec

This commit is contained in:
Wilson Snyder
2012-02-20 09:55:20 -05:00
parent f1546abf09
commit 7caafb4014
6 changed files with 87 additions and 76 deletions
+2 -2
View File
@@ -110,13 +110,13 @@ private:
} else if (rhs > 0) {
AstNode* newp = new AstSub(lhsp->fileline(), lhsp,
new AstConst(lhsp->fileline(), AstConst::Unsized32(), rhs));
// We must make sure sub gets sign of original value
// We must make sure sub gets sign of original value, not from the constant
newp->numericFrom(lhsp);
return newp;
} else { // rhs < 0;
AstNode* newp = new AstAdd(lhsp->fileline(), lhsp,
new AstConst(lhsp->fileline(), AstConst::Unsized32(), -rhs));
// We must make sure sub gets sign of original value
// We must make sure sub gets sign of original value, not from the constant
newp->numericFrom(lhsp);
return newp;
}