mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
Fixed potential non-const cast of array size in type lookup
This commit is contained in:
parent
080dd5a25e
commit
a14544efa6
1 changed files with 5 additions and 1 deletions
|
@ -3174,7 +3174,11 @@ int BfResolvedTypeSet::Hash(BfTypeReference* typeRef, LookupContext* ctx, BfHash
|
|||
if (!typedVal)
|
||||
ctx->mFailed = true;
|
||||
if (typedVal)
|
||||
{
|
||||
SetAndRestoreValue<bool> prevIgnoreWrites(ctx->mModule->mBfIRBuilder->mIgnoreWrites, true);
|
||||
typedVal = ctx->mModule->Cast(sizeExpr, typedVal, intType);
|
||||
}
|
||||
|
||||
if (typedVal)
|
||||
{
|
||||
auto constant = ctx->mModule->mBfIRBuilder->GetConstant(typedVal.mValue);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue