fixed semantic intellisense

This commit is contained in:
Ivan Bondarev 2024-05-07 22:04:03 +02:00
parent efafd27ffb
commit bff1425ede
5 changed files with 7 additions and 4 deletions

View file

@ -316,6 +316,7 @@ namespace CodeCompletion
compiler = new Compiler();
compiler.CompilerOptions = co;
compiler.ClearAfterCompilation = false;
compiler.ParsersController.LastParser = compiler.ParsersController.SelectParser(Path.GetExtension(cu.source_context.FileName).ToLower());
compiler.Compile();
foreach (var lv in compiler.CompiledVariables)
CorrectVariableType(lv);

View file

@ -961,7 +961,7 @@ namespace CodeCompletion
{
returned_scopes[i] = null;
}
else if (left_scope is TypeScope && returned_scopes[i] is ProcScope && !(returned_scopes[i] as ProcScope).IsStatic && !(returned_scopes[i] as ProcScope).IsConstructor())
else if (left_scope is TypeScope && returned_scopes[i] is ProcScope && !(returned_scopes[i] as ProcScope).IsStatic && !(returned_scopes[i] as ProcScope).IsConstructor() && !(returned_scope is TypeScope && (returned_scopes[i] as ProcScope).is_extension))
{
returned_scopes[i] = null;
}

View file

@ -2,5 +2,4 @@
var a{@var a: sequence of class;@} := (1..18).Sel(i->new class(f := i, g := i.ToS));
var x{@var x: string;@} := a.First.g;
var y{@var y: class;@} := a.First;
writeln(a.First.g{@property class.g: string;@});
writeln(a.First.g{@property class.g: string;@});

View file

@ -0,0 +1,3 @@
begin
System.Linq.Enumerable.Any{@(расширение sequence of T) function Any<>(): boolean;@};
end.

View file

@ -1,4 +1,4 @@
begin
begin
var d := new Dictionary<real,byte>;
foreach var b{@var b: real;@} in d.Keys do;
var l := new List<integer>;