mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-20 08:58:00 +02:00
Fix for calling private ctor from another ctor within the current type
This commit is contained in:
parent
f041caaeb8
commit
9ffdb94740
2 changed files with 6 additions and 8 deletions
|
@ -5602,11 +5602,14 @@ BfTypedValue BfExprEvaluator::MatchConstructor(BfAstNode* targetSrc, BfMethodBou
|
|||
if (!isFailurePass)
|
||||
{
|
||||
if (callCtorBodyOnly)
|
||||
{
|
||||
if (curTypeDef != targetType->mTypeDef)
|
||||
{
|
||||
// We're calling the base class's ctor from a derived class
|
||||
if (checkProt <= BfProtection_Private)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (checkProt == BfProtection_Protected) // Treat protected constructors as private
|
||||
|
|
|
@ -14219,11 +14219,6 @@ void BfModule::EmitCtorBody(bool& skipBody)
|
|||
}
|
||||
}
|
||||
|
||||
if (mCurTypeInstance->IsDelegate())
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
||||
BfAstNode* baseCtorNode = NULL;
|
||||
if ((ctorDeclaration != NULL) && (ctorDeclaration->mInitializer != NULL) && (ctorDeclaration->mInitializer->mTarget != NULL))
|
||||
baseCtorNode = ctorDeclaration->mInitializer->mTarget;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue