mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 20:09:25 +02:00
* 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:
parent
82b2a1d48f
commit
40f88809af
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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
43
tests/webtbs/tw15274.pp
Normal 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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user