Add basic support for first_assignment_defines_type in Intellisense (#3376)
This commit is contained in:
parent
42d7ca97a3
commit
fed0786795
|
|
@ -308,6 +308,7 @@ namespace CodeCompletion
|
|||
var co = new CompilerOptions();
|
||||
co.SavePCU = false;
|
||||
co.GenerateCode = false;
|
||||
if (!currentUnitLanguage.ApplySyntaxTreeConvertersForIntellisense)
|
||||
co.UnitSyntaxTree = cu;
|
||||
co.SourceFileName = cu.source_context.FileName;
|
||||
co.ForIntellisense = true;
|
||||
|
|
@ -488,6 +489,13 @@ namespace CodeCompletion
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_assign.first_assignment_defines_type)
|
||||
{
|
||||
_assign.from.visit(this);
|
||||
var variableScope = (ElementScope)cur_scope.FindName(((ident)_assign.to).name);
|
||||
variableScope.sc = returned_scope;
|
||||
}
|
||||
}
|
||||
|
||||
public override void visit(bin_expr _bin_expr)
|
||||
|
|
|
|||
Loading…
Reference in a new issue