mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
DynamicCastToSignature release fix
This commit is contained in:
parent
37f72cd3b6
commit
c7da3e15f9
4 changed files with 9 additions and 9 deletions
|
@ -130,13 +130,13 @@ namespace System
|
|||
{
|
||||
return null;
|
||||
}
|
||||
#endif
|
||||
|
||||
[NoShow]
|
||||
public virtual Object DynamicCastToSignature(int32 sig)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
#endif
|
||||
|
||||
int IHashable.GetHashCode()
|
||||
{
|
||||
|
|
|
@ -1355,9 +1355,9 @@ BfMethodDef* BfDefBuilder::AddDtor(BfTypeDef* typeDef)
|
|||
return methodDef;
|
||||
}
|
||||
|
||||
void BfDefBuilder::AddDynamicCastMethods(BfTypeDef* typeDef)
|
||||
void BfDefBuilder::AddDynamicCastMethods(BfTypeDef* typeDef, bool needsDynamicCastMethods)
|
||||
{
|
||||
//
|
||||
if (needsDynamicCastMethods)
|
||||
{
|
||||
auto methodDef = new BfMethodDef();
|
||||
methodDef->mIdx = (int)typeDef->mMethods.size();
|
||||
|
@ -1378,7 +1378,7 @@ void BfDefBuilder::AddDynamicCastMethods(BfTypeDef* typeDef)
|
|||
methodDef->mIsNoReflect = true;
|
||||
}
|
||||
|
||||
//
|
||||
if (needsDynamicCastMethods)
|
||||
{
|
||||
auto methodDef = new BfMethodDef();
|
||||
methodDef->mIdx = (int)typeDef->mMethods.size();
|
||||
|
@ -2392,10 +2392,10 @@ void BfDefBuilder::FinishTypeDef(bool wantsToString)
|
|||
isAutocomplete = true;
|
||||
|
||||
//TODO: Don't do this for the autocomplete pass
|
||||
if ((needsDynamicCastMethod) && (mCurTypeDef->mTypeCode != BfTypeCode_Interface) && (mCurTypeDef->mTypeCode != BfTypeCode_Extension) &&
|
||||
if ((mCurTypeDef->mTypeCode != BfTypeCode_Interface) && (mCurTypeDef->mTypeCode != BfTypeCode_Extension) &&
|
||||
(!mCurTypeDef->mIsStatic) && (!isAutocomplete) && (!isAlias) && (!mCurTypeDef->mIsOpaque))
|
||||
{
|
||||
AddDynamicCastMethods(mCurTypeDef);
|
||||
AddDynamicCastMethods(mCurTypeDef, needsDynamicCastMethod);
|
||||
}
|
||||
|
||||
bool isPayloadEnum = false;
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
static BfFieldDef* AddField(BfTypeDef* typeDef, BfTypeReference* typeRef, const StringImpl& name);
|
||||
static BfMethodDef* AddMethod(BfTypeDef* typeDef, BfMethodType methodType, BfProtection protection, bool isStatic, const StringImpl& name, bool addedAfterEmit = false);
|
||||
static BfMethodDef* AddDtor(BfTypeDef* typeDef);
|
||||
static void AddDynamicCastMethods(BfTypeDef* typeDef);
|
||||
static void AddDynamicCastMethods(BfTypeDef* typeDef, bool needsDynamicCastMethods);
|
||||
static void AddParam(BfMethodDef* methodDef, BfTypeReference* typeRef, const StringImpl& paramName);
|
||||
BfTypeDef* ComparePrevTypeDef(BfTypeDef* prevTypeDef, BfTypeDef* checkTypeDef);
|
||||
void FinishTypeDef(bool wantsToString);
|
||||
|
|
|
@ -9520,7 +9520,7 @@ BfType* BfModule::ResolveGenericType(BfType* unspecializedType, BfTypeVector* ty
|
|||
if (typeDef->mIsDelegate)
|
||||
{
|
||||
BfDefBuilder::AddMethod(typeDef, BfMethodType_Ctor, BfProtection_Public, false, "");
|
||||
BfDefBuilder::AddDynamicCastMethods(typeDef);
|
||||
BfDefBuilder::AddDynamicCastMethods(typeDef, true);
|
||||
}
|
||||
|
||||
delegateType->mContext = mContext;
|
||||
|
@ -12907,7 +12907,7 @@ BfType* BfModule::ResolveTypeRef_Ref(BfTypeReference* typeRef, BfPopulateType po
|
|||
if (typeDef->mIsDelegate)
|
||||
{
|
||||
BfDefBuilder::AddMethod(typeDef, BfMethodType_Ctor, BfProtection_Public, false, "");
|
||||
BfDefBuilder::AddDynamicCastMethods(typeDef);
|
||||
BfDefBuilder::AddDynamicCastMethods(typeDef, true);
|
||||
}
|
||||
|
||||
delegateType->mContext = mContext;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue