1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Inference of tuple 'params T`

This commit is contained in:
Brian Fiete 2025-02-18 07:56:02 -08:00
parent f6d18c111f
commit 66d3581911
14 changed files with 721 additions and 75 deletions

View file

@ -15280,6 +15280,13 @@ BfTypedValue BfModule::Cast(BfAstNode* srcNode, const BfTypedValue& typedVal, Bf
}*/
BfCastResultFlags castResultFlags = BfCastResultFlags_None;
if ((typedVal.IsParams()) && (toType->IsParamsType()))
{
if (typedVal.mType == toType->GetUnderlyingType())
return BfTypedValue(mBfIRBuilder->GetFakeVal(), toType);
}
auto castedValue = CastToValue(srcNode, typedVal, toType, castFlags, &castResultFlags);
if (!castedValue)
return BfTypedValue();