mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed int-unknown shift, wantType with int(X) style cast
This commit is contained in:
parent
3a1db510e2
commit
c555b8b7ef
1 changed files with 5 additions and 1 deletions
|
@ -7460,7 +7460,7 @@ void BfExprEvaluator::FinishDeferredEvals(SizedArrayImpl<BfResolvedArg>& argValu
|
||||||
{
|
{
|
||||||
auto expr = BfNodeDynCast<BfExpression>(argValues[argIdx].mExpression);
|
auto expr = BfNodeDynCast<BfExpression>(argValues[argIdx].mExpression);
|
||||||
if (expr != NULL)
|
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()))
|
if ((refType != NULL) && (refType->IsPrimitiveType()))
|
||||||
{
|
{
|
||||||
|
for (auto& resolvedArg : argValues.mResolvedArgs)
|
||||||
|
resolvedArg.mExpectedType = refType;
|
||||||
|
|
||||||
FinishDeferredEvals(argValues);
|
FinishDeferredEvals(argValues);
|
||||||
|
|
||||||
if (argValues.mResolvedArgs.IsEmpty())
|
if (argValues.mResolvedArgs.IsEmpty())
|
||||||
|
@ -23882,6 +23885,7 @@ void BfExprEvaluator::PerformBinaryOperation(BfAstNode* leftExpression, BfAstNod
|
||||||
if ((binaryOp == BfBinaryOp_LeftShift) || (binaryOp == BfBinaryOp_RightShift))
|
if ((binaryOp == BfBinaryOp_LeftShift) || (binaryOp == BfBinaryOp_RightShift))
|
||||||
{
|
{
|
||||||
forceLeftType = true;
|
forceLeftType = true;
|
||||||
|
mModule->FixIntUnknown(leftValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rightValue.mType->IsRef())
|
if (rightValue.mType->IsRef())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue