mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Improved ability of methodrefs to be used for Delegate constraints
This commit is contained in:
parent
7aa2fdf976
commit
46947636f7
3 changed files with 30 additions and 20 deletions
|
@ -568,6 +568,12 @@ BfMethodCustomAttributes::~BfMethodCustomAttributes()
|
|||
|
||||
BfMethodInstance* BfMethodParam::GetDelegateParamInvoke()
|
||||
{
|
||||
if (mResolvedType->IsMethodRef())
|
||||
{
|
||||
auto methodRefType = (BfMethodRefType*)mResolvedType;
|
||||
return methodRefType->mMethodRef;
|
||||
}
|
||||
|
||||
BF_ASSERT(mResolvedType->IsDelegate() || mResolvedType->IsFunction());
|
||||
auto bfModule = BfModule::GetModuleFor(mResolvedType);
|
||||
BfMethodInstance* invokeMethodInstance = bfModule->GetRawMethodInstanceAtIdx(mResolvedType->ToTypeInstance(), 0, "Invoke");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue