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:
parent
a5794d210c
commit
d3e5005814
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue