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

Allow 'concrete' to still allow a returned interface instance

This commit is contained in:
Brian Fiete 2020-05-31 07:27:51 -07:00
parent adf495d171
commit e93757141d

View file

@ -4136,12 +4136,10 @@ void BfModule::DoTypeInstanceMethodProcessing(BfTypeInstance* typeInstance)
if (matchedMethod->mReturnType != iReturnType)
hadMatch = false;
}
else
else
{
// Concrete
if (matchedMethod->mReturnType->IsInterface())
hadMatch = false;
else if (!CanCast(GetFakeTypedValue(matchedMethod->mReturnType), iReturnType))
// Concrete/generic
if (!CanCast(GetFakeTypedValue(matchedMethod->mReturnType), iReturnType))
hadMatch = false;
}