mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Causing full refresh in IDE when deleting types
This commit is contained in:
parent
ed1cf60bb9
commit
730ae877fa
3 changed files with 11 additions and 7 deletions
|
@ -1785,6 +1785,7 @@ void BfContext::UpdateRevisedTypes()
|
|||
|
||||
if (typeDef->mDefState == BfTypeDef::DefState_Deleted)
|
||||
{
|
||||
HandleChangedTypeDef(typeDef);
|
||||
DeleteType(typeInst);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -13596,7 +13596,7 @@ void BfModule::EmitDtorBody()
|
|||
UpdateSrcPos(typeDef->mTypeDeclaration);
|
||||
if ((methodDeclaration != NULL) && (methodDeclaration->mFatArrowToken != NULL))
|
||||
{
|
||||
Fail("Destructors cannot have expression bodies", methodDeclaration->mFatArrowToken);
|
||||
Fail("Destructors cannot have expression bodies", methodDeclaration->mFatArrowToken, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13610,7 +13610,7 @@ void BfModule::EmitDtorBody()
|
|||
{
|
||||
if ((!methodDef->mIsStatic) && (mCurTypeInstance->IsValueType()))
|
||||
{
|
||||
Fail("Structs cannot have field destructors", fieldDef->mFieldDeclaration->mFieldDtor->mTildeToken);
|
||||
Fail("Structs cannot have field destructors", fieldDef->mFieldDeclaration->mFieldDtor->mTildeToken, true);
|
||||
}
|
||||
|
||||
SetAndRestoreValue<BfFilePosition> prevFilePos(mCurFilePosition);
|
||||
|
@ -13650,7 +13650,7 @@ void BfModule::EmitDtorBody()
|
|||
else
|
||||
{
|
||||
AssertErrorState();
|
||||
value = mBfIRBuilder->CreateConstNull(mBfIRBuilder->GetPointerTo(mBfIRBuilder->MapType(fieldInst->mResolvedType)));
|
||||
value = mBfIRBuilder->CreateAlloca(mBfIRBuilder->MapType(fieldInst->mResolvedType));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13771,6 +13771,8 @@ void BfModule::EmitDtorBody()
|
|||
if ((curFieldDef != NULL) && (fieldDef->mName == curFieldDef->mName))
|
||||
fieldType = curFieldInstance->GetResolvedType();
|
||||
}
|
||||
if (fieldType == NULL)
|
||||
fieldType = GetPrimitiveType(BfTypeCode_Var);
|
||||
|
||||
auto fieldDtor = fieldDef->mFieldDeclaration->mFieldDtor;
|
||||
|
||||
|
|
|
@ -853,9 +853,10 @@ bool BfTypeDef::HasSource(BfSource* source)
|
|||
{
|
||||
if (mNextRevision != NULL)
|
||||
return mNextRevision->HasSource(source);
|
||||
|
||||
if (mSource == source)
|
||||
return true;
|
||||
if ((mSource != NULL) && (mSource->mNextRevision != NULL) && (mSource->mNextRevision == source))
|
||||
return true;
|
||||
for (auto partial : mPartials)
|
||||
if (partial->mSource == source)
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue