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

Fix Initializer Go To Definition

This commit is contained in:
disarray2077 2021-12-23 18:36:07 -03:00 committed by GitHub
parent 6e869c5ac5
commit 2ccfd9e2d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10200,6 +10200,17 @@ void BfExprEvaluator::Visit(BfInitializerExpression* initExpr)
if ((fieldResult) || (mPropDef != NULL))
{
if (mResultFieldInstance != NULL)
{
auto autoComplete = GetAutoComplete();
if ((autoComplete != NULL) && (autoComplete->IsAutocompleteNode(identifierNode)))
{
auto fieldDef = mResultFieldInstance->GetFieldDef();
if (fieldDef != NULL)
autoComplete->SetDefinitionLocation(fieldDef->GetRefNode());
}
}
mResult = fieldResult;
PerformAssignment(assignExpr, true, BfTypedValue());
mResult = BfTypedValue();