1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed int-unknown shift, wantType with int(X) style cast

This commit is contained in:
Brian Fiete 2024-12-02 12:27:49 -05:00
parent 3a1db510e2
commit c555b8b7ef

View file

@ -7460,7 +7460,7 @@ void BfExprEvaluator::FinishDeferredEvals(SizedArrayImpl<BfResolvedArg>& argValu
{
auto expr = BfNodeDynCast<BfExpression>(argValues[argIdx].mExpression);
if (expr != NULL)
argValue = mModule->CreateValueFromExpression(expr);
argValue = mModule->CreateValueFromExpression(expr, argValues[argIdx].mExpectedType);
}
}
}
@ -10076,6 +10076,9 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
if ((refType != NULL) && (refType->IsPrimitiveType()))
{
for (auto& resolvedArg : argValues.mResolvedArgs)
resolvedArg.mExpectedType = refType;
FinishDeferredEvals(argValues);
if (argValues.mResolvedArgs.IsEmpty())
@ -23882,6 +23885,7 @@ void BfExprEvaluator::PerformBinaryOperation(BfAstNode* leftExpression, BfAstNod
if ((binaryOp == BfBinaryOp_LeftShift) || (binaryOp == BfBinaryOp_RightShift))
{
forceLeftType = true;
mModule->FixIntUnknown(leftValue);
}
if (rightValue.mType->IsRef())