This commit is contained in:
Бондарев Иван 2018-05-23 20:47:19 +02:00
parent bacf51ef63
commit 769e30f3cb
3 changed files with 28 additions and 1 deletions

View file

@ -1387,7 +1387,13 @@ namespace CodeCompletion
public override void visit(inherited_ident _inherited_ident) public override void visit(inherited_ident _inherited_ident)
{ {
throw new NotImplementedException(); var tmp_scope = entry_scope;
if (entry_scope.topScope is TypeScope)
{
entry_scope = (entry_scope.topScope as TypeScope).baseScope;
}
new ident(_inherited_ident.name).visit(this);
entry_scope = tmp_scope;
} }
public override void visit(format_expr _format_expr) public override void visit(format_expr _format_expr)

View file

@ -2575,6 +2575,7 @@ namespace PascalABCCompiler.Parsers
} }
else if (s == "inherited") else if (s == "inherited")
{ {
bound = i + 1;
keyword = KeywordKind.Inherited; keyword = KeywordKind.Inherited;
} }
else if (s == "raise") else if (s == "raise")

View file

@ -0,0 +1,20 @@
type
t1=class
procedure p1; virtual;
begin
end;
end;
t2=class(t1)
procedure p1; override;
begin
inherited p1{@procedure t1.p1(); virtual;@}();
end;
end;
t3=class(t2)
procedure p1; override;
begin
inherited p1{@procedure t2.p1(); override;@};
end;
end;
begin end.