* don't error out or generate invalid code for "with x do ;"

(Delphi/TP-compatible, mantis #15274)

git-svn-id: trunk@14370 -
This commit is contained in:
Jonas Maebe 2009-12-08 19:45:08 +00:00
parent 82b2a1d48f
commit 40f88809af
3 changed files with 45 additions and 1 deletions

1
.gitattributes vendored
View File

@ -10110,6 +10110,7 @@ tests/webtbs/tw1501.pp svneol=native#text/plain
tests/webtbs/tw15088.pp svneol=native#text/plain
tests/webtbs/tw15169.pp svneol=native#text/plain
tests/webtbs/tw15207.pp svneol=native#text/plain
tests/webtbs/tw15274.pp svneol=native#text/plain
tests/webtbs/tw1532.pp svneol=native#text/plain
tests/webtbs/tw1539.pp svneol=native#text/plain
tests/webtbs/tw1567.pp svneol=native#text/plain

View File

@ -694,7 +694,7 @@ implementation
if token<>_SEMICOLON then
p:=statement
else
p:=cerrornode.create;
p:=cnothingnode.create;
end;
{ remove symtables in reverse order from the stack }

43
tests/webtbs/tw15274.pp Normal file
View File

@ -0,0 +1,43 @@
{ %norun }
{$mode objfpc}{$H+}
uses
Classes, SysUtils;
type
{ TItem }
TItem = class
public
procedure DoSomething;
end;
{ TConainer }
TContainer = class
public
constructor Create;
end;
{ TConainer }
constructor TContainer.Create;
begin
inherited Create;
with TItem.Create do
;
// begin end;
end;
{ TItem }
procedure TItem.DoSomething;
begin
end;
begin
end.