mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 14:54:09 +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;
|
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
|
// We need to upsize the index so we can compare it against the larger elementCount
|
||||||
indexType = mModule->GetPrimitiveType(BfTypeCode_IntPtr);
|
indexType = mModule->GetPrimitiveType(BfTypeCode_IntPtr);
|
||||||
|
@ -22447,6 +22447,8 @@ void BfExprEvaluator::PerformBinaryOperation(BfType* resultType, BfIRValue convL
|
||||||
mResult = BfTypedValue(mModule->mBfIRBuilder->CreateConst(BfTypeCode_Boolean, 0),
|
mResult = BfTypedValue(mModule->mBfIRBuilder->CreateConst(BfTypeCode_Boolean, 0),
|
||||||
mModule->GetPrimitiveType(BfTypeCode_Boolean));
|
mModule->GetPrimitiveType(BfTypeCode_Boolean));
|
||||||
return;
|
return;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue