bug fix #518
This commit is contained in:
parent
c22e32b299
commit
d0900679e3
|
|
@ -70,7 +70,8 @@ namespace CodeCompletion
|
|||
foreach (statement stmt in _statement_list.subnodes)
|
||||
{
|
||||
IBaseScope tmp2 = cur_scope;
|
||||
cur_scope = cur_scope.FindScopeByLocation(stmt.source_context.begin_position.line_num, stmt.source_context.begin_position.column_num);
|
||||
if (stmt.source_context != null)
|
||||
cur_scope = cur_scope.FindScopeByLocation(stmt.source_context.begin_position.line_num, stmt.source_context.begin_position.column_num);
|
||||
if (cur_scope == null)
|
||||
cur_scope = tmp2;
|
||||
stmt.visit(this);
|
||||
|
|
|
|||
|
|
@ -1511,11 +1511,12 @@ namespace CodeCompletion
|
|||
public override SymScope FindName(string name)
|
||||
{
|
||||
//SymScope sc = ht[name] as SymScope;
|
||||
SymScope sc = def_proc.FindNameOnlyInType(name);
|
||||
/*SymScope sc = def_proc.FindNameOnlyInType(name);
|
||||
if (sc != null) return sc;
|
||||
if (top_mod_scope != null)
|
||||
return top_mod_scope.FindName(name);
|
||||
return null;
|
||||
return null;*/
|
||||
return def_proc.FindName(name);
|
||||
}
|
||||
|
||||
public override SymScope FindNameOnlyInType(string name)
|
||||
|
|
|
|||
13
TestSuite/intellisense_tests/class2.pas
Normal file
13
TestSuite/intellisense_tests/class2.pas
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
type
|
||||
t1=class
|
||||
|
||||
i:integer;
|
||||
|
||||
procedure p1;
|
||||
|
||||
end;
|
||||
|
||||
procedure t1.p1 := writeln(i{@var t1.i: integer;@});
|
||||
|
||||
begin
|
||||
end.
|
||||
Loading…
Reference in a new issue