1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed issue with outer extension state change

This commit is contained in:
Brian Fiete 2020-01-19 07:35:17 -08:00
parent 04a93f0618
commit c7e41a30e4
5 changed files with 116 additions and 5 deletions

View file

@ -1467,7 +1467,12 @@ void BfDefBuilder::Visit(BfTypeDeclaration* typeDeclaration)
{
if (checkTypeDef->mDefState == BfTypeDef::DefState_AwaitingNewVersion)
{
if (isExtension == (checkTypeDef->mTypeCode == BfTypeCode_Extension))
// We don't allow "new revision" semantics if the 'isExtension' state changes, or
// if the outer type did not use "new revision" semantics (for isExtension change on itself or other outer type)
bool isCompatible = (isExtension == (checkTypeDef->mTypeCode == BfTypeCode_Extension)) &&
(checkTypeDef->mOuterType == actualOuterTypeDef);
if (isCompatible)
{
if (prevRevisionTypeDef == NULL)
{