1
0
Fork 0
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:
Brian Fiete 2020-12-29 09:23:29 -08:00
parent 78ae79b802
commit c91e8e0fb4
2 changed files with 36 additions and 2 deletions

View file

@ -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) &&