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

DoesLiteralFit selection fix

This commit is contained in:
Brian Fiete 2021-12-22 05:43:46 -05:00
parent a5794d210c
commit d3e5005814

View file

@ -19770,7 +19770,7 @@ void BfExprEvaluator::Visit(BfIndexerExpression* indexerExpr)
auto indexType = (BfPrimitiveType*)indexArgument.mType;
if (!mModule->mSystem->DoesLiteralFit(indexType->mTypeDef->mTypeCode, sizedArrayType->mElementCount))
if (!mModule->mSystem->DoesLiteralFit(indexType->mTypeDef->mTypeCode, (int64)sizedArrayType->mElementCount))
{
// We need to upsize the index so we can compare it against the larger elementCount
indexType = mModule->GetPrimitiveType(BfTypeCode_IntPtr);
@ -22447,6 +22447,8 @@ void BfExprEvaluator::PerformBinaryOperation(BfType* resultType, BfIRValue convL
mResult = BfTypedValue(mModule->mBfIRBuilder->CreateConst(BfTypeCode_Boolean, 0),
mModule->GetPrimitiveType(BfTypeCode_Boolean));
return;
default:
break;
}
}