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:
parent
9ecc42aabc
commit
7b29a4facb
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue