mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Continue searching in CastToValue constraint check on method return fail
This commit is contained in:
parent
abd511a93d
commit
e4cac2ca24
1 changed files with 5 additions and 1 deletions
|
@ -13764,7 +13764,11 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
|
|||
{
|
||||
auto result = BfTypedValue(mBfIRBuilder->GetFakeVal(), operatorConstraintReturnType);
|
||||
if (result.mType != toType)
|
||||
return CastToValue(srcNode, result, toType, (BfCastFlags)(castFlags | BfCastFlags_Explicit | BfCastFlags_NoConversionOperator), resultFlags);
|
||||
{
|
||||
auto castedResult = CastToValue(srcNode, result, toType, (BfCastFlags)(castFlags | BfCastFlags_Explicit | BfCastFlags_NoConversionOperator), resultFlags);
|
||||
if (castedResult)
|
||||
return castedResult;
|
||||
}
|
||||
if (result)
|
||||
return result.mValue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue