mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Cast fix
This commit is contained in:
parent
66cfe1b28c
commit
1b9e97a65c
1 changed files with 2 additions and 2 deletions
|
@ -12759,7 +12759,7 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
methodMatcher.mArguments[0].mTypedValue = Cast(srcNode, typedVal, wantType, (BfCastFlags)(castFlags | BfCastFlags_Explicit));
|
methodMatcher.mArguments[0].mTypedValue = Cast(srcNode, typedVal, wantType, (BfCastFlags)(castFlags | BfCastFlags_Explicit | BfCastFlags_NoConversionOperator));
|
||||||
if (paramType->IsRef())
|
if (paramType->IsRef())
|
||||||
{
|
{
|
||||||
typedVal = MakeAddressable(typedVal);
|
typedVal = MakeAddressable(typedVal);
|
||||||
|
@ -12781,7 +12781,7 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
|
||||||
result = LoadValue(result);
|
result = LoadValue(result);
|
||||||
|
|
||||||
if (result.mType != toType)
|
if (result.mType != toType)
|
||||||
return CastToValue(srcNode, result, toType, (BfCastFlags)(castFlags | BfCastFlags_Explicit), resultFlags);
|
return CastToValue(srcNode, result, toType, (BfCastFlags)(castFlags | BfCastFlags_Explicit | BfCastFlags_NoConversionOperator), resultFlags);
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
return result.mValue;
|
return result.mValue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue