1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Fix for calling private ctor from another ctor within the current type

This commit is contained in:
Brian Fiete 2020-02-19 06:55:06 -08:00
parent f041caaeb8
commit 9ffdb94740
2 changed files with 6 additions and 8 deletions

View file

@ -5603,9 +5603,12 @@ BfTypedValue BfExprEvaluator::MatchConstructor(BfAstNode* targetSrc, BfMethodBou
{
if (callCtorBodyOnly)
{
// We're calling the base class's ctor from a derived class
if (checkProt <= BfProtection_Private)
continue;
if (curTypeDef != targetType->mTypeDef)
{
// We're calling the base class's ctor from a derived class
if (checkProt <= BfProtection_Private)
continue;
}
}
else
{