mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 15:26:00 +02:00
Added Variant support to reflected method invocation
This commit is contained in:
parent
5bdaeadc25
commit
2eb7ce3e1a
7 changed files with 387 additions and 7 deletions
|
@ -1541,10 +1541,9 @@ bool BfMethodMatcher::CheckMethod(BfTypeInstance* targetTypeInstance, BfTypeInst
|
|||
goto NoMatch;
|
||||
}
|
||||
|
||||
if (paramsArrayType->IsArray())
|
||||
{
|
||||
auto arrayType = (BfArrayType*)paramsArrayType;
|
||||
paramsElementType = arrayType->mGenericTypeInfo->mTypeGenericArguments[0];
|
||||
if ((paramsArrayType->IsArray()) || (paramsArrayType->IsInstanceOf(mModule->mCompiler->mSpanTypeDef)))
|
||||
{
|
||||
paramsElementType = paramsArrayType->GetUnderlyingType();
|
||||
|
||||
while (argIdx < (int)mArguments.size())
|
||||
{
|
||||
|
|
|
@ -8930,7 +8930,7 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
|
|||
// * <-> Var
|
||||
if ((typedVal.mType->IsVar()) || (toType->IsVar()))
|
||||
{
|
||||
return GetDefaultValue(toType);
|
||||
return mBfIRBuilder->CreateUndefValue(mBfIRBuilder->MapType(toType));
|
||||
}
|
||||
|
||||
// Generic param -> *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue