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

Fixit for adding ctor

This commit is contained in:
Brian Fiete 2020-09-19 15:36:25 -07:00
parent 0794ed8592
commit 4571221551
3 changed files with 81 additions and 0 deletions

View file

@ -5888,6 +5888,10 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
{
error = mModule->Fail(StrFormat("No parameterless constructor is available for base class. Consider calling base constructor '%s'.",
mModule->MethodToString(methodInstance).c_str()), refNode);
auto srcNode = mModule->mCurMethodInstance->mMethodDef->GetRefNode();
if ((autoComplete != NULL) && (autoComplete->CheckFixit(srcNode)))
autoComplete->FixitAddConstructor(mModule->mCurTypeInstance);
}
}