mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fixed comptime declaring type with types with extension
This commit is contained in:
parent
2a3efe3698
commit
6fe2a7002a
6 changed files with 54 additions and 21 deletions
|
@ -3220,7 +3220,10 @@ void BfSystem::CopyTypeDef(BfTypeDef* typeDef, BfTypeDef* fromTypeDef)
|
|||
{
|
||||
methodDef = new BfMethodDef();
|
||||
*methodDef = *fromMethodDef;
|
||||
}
|
||||
}
|
||||
|
||||
if (methodDef->mDeclaringType == fromTypeDef)
|
||||
methodDef->mDeclaringType = typeDef;
|
||||
|
||||
for (int paramIdx = 0; paramIdx < fromMethodDef->mParams.mSize; paramIdx++)
|
||||
{
|
||||
|
@ -3254,6 +3257,8 @@ void BfSystem::CopyTypeDef(BfTypeDef* typeDef, BfTypeDef* fromTypeDef)
|
|||
{
|
||||
BfPropertyDef* propDef = new BfPropertyDef();
|
||||
*propDef = *fromPropDef;
|
||||
if (propDef->mDeclaringType == fromTypeDef)
|
||||
propDef->mDeclaringType = typeDef;
|
||||
for (auto& methodDef : propDef->mMethods)
|
||||
methodDef = typeDef->mMethods[methodDef->mIdx];
|
||||
propDef->mNextWithSameName = NULL;
|
||||
|
@ -3264,6 +3269,8 @@ void BfSystem::CopyTypeDef(BfTypeDef* typeDef, BfTypeDef* fromTypeDef)
|
|||
{
|
||||
BfFieldDef* fieldDef = new BfFieldDef();
|
||||
*fieldDef = *fromField;
|
||||
if (fieldDef->mDeclaringType == fromTypeDef)
|
||||
fieldDef->mDeclaringType = typeDef;
|
||||
fieldDef->mNextWithSameName = NULL;
|
||||
typeDef->mFields.Add(fieldDef);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue