mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +02:00
Added uninitialized ctors: this(?), base(?)
This commit is contained in:
parent
48e752e95f
commit
dde6a56a03
1 changed files with 18 additions and 0 deletions
|
@ -14587,6 +14587,24 @@ void BfModule::EmitCtorBody(bool& skipBody)
|
||||||
mCurMethodState->mCurAppendAlign = methodInstance->mAppendAllocAlign;
|
mCurMethodState->mCurAppendAlign = methodInstance->mAppendAllocAlign;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((ctorDeclaration != NULL) && (ctorDeclaration->mInitializer != NULL) && (ctorDeclaration->mInitializer->mArguments.size() == 1) && (targetType != NULL))
|
||||||
|
{
|
||||||
|
if (auto tokenNode = BfNodeDynCast<BfUninitializedExpression>(ctorDeclaration->mInitializer->mArguments[0]))
|
||||||
|
{
|
||||||
|
if (targetType == mCurTypeInstance)
|
||||||
|
{
|
||||||
|
auto thisVariable = GetThisVariable();
|
||||||
|
if (thisVariable != NULL)
|
||||||
|
{
|
||||||
|
thisVariable->mUnassignedFieldFlags = 0;
|
||||||
|
thisVariable->mIsAssigned = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
targetType = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (targetType != NULL)
|
if (targetType != NULL)
|
||||||
{
|
{
|
||||||
BfAstNode* refNode = methodDeclaration;
|
BfAstNode* refNode = methodDeclaration;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue