1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Fixed extension methods where target is wrappable type

This commit is contained in:
Brian Fiete 2025-01-22 08:33:31 -08:00
parent 9ecc42aabc
commit 7b29a4facb

View file

@ -2296,7 +2296,11 @@ bool BfMethodMatcher::CheckMethod(BfTypeInstance* targetTypeInstance, BfTypeInst
if (!mModule->CanCast(argTypedValue, wantType, castFlags))
{
if ((mAllowImplicitWrap) && (argTypedValue.mType->IsWrappableType()) && (mModule->GetWrappedStructType(argTypedValue.mType) == wantType))
if ((argIdx == -1) && (wantType->IsWrappableType()) && (mModule->GetWrappedStructType(wantType) == argTypedValue.mType))
{
// Extension target can be wrapped
}
else if ((mAllowImplicitWrap) && (argTypedValue.mType->IsWrappableType()) && (mModule->GetWrappedStructType(argTypedValue.mType) == wantType))
{
// Is wrapped type
}