mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fixed multiple calls to base ctor in extension with bodyless ctor
This commit is contained in:
parent
78ae79b802
commit
c91e8e0fb4
2 changed files with 36 additions and 2 deletions
|
@ -16160,8 +16160,8 @@ void BfModule::EmitCtorBody(bool& skipBody)
|
|||
auto targetToken = BfNodeDynCast<BfTokenNode>(ctorInvocation->mTarget);
|
||||
targetType = (targetToken->GetToken() == BfToken_This) ? mCurTypeInstance : mCurTypeInstance->mBaseType;
|
||||
}
|
||||
else if ((mCurTypeInstance->mBaseType != NULL) && (!mCurTypeInstance->IsUnspecializedType()))
|
||||
{
|
||||
else if ((mCurTypeInstance->mBaseType != NULL) && (!mCurTypeInstance->IsUnspecializedType()) && (methodDef->mMethodType != BfMethodType_CtorNoBody))
|
||||
{
|
||||
auto baseType = mCurTypeInstance->mBaseType;
|
||||
if ((!mCurTypeInstance->IsTypedPrimitive()) &&
|
||||
(baseType->mTypeDef != mCompiler->mValueTypeTypeDef) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue