mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-23 08:51:36 +02:00
* fix for Mantis #36631: it's an error if a POINT after an array is not followed by an identifier
+ added tests git-svn-id: trunk@44082 -
This commit is contained in:
parent
00214406bc
commit
1407aa2b4b
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -16197,6 +16197,8 @@ tests/webtbf/tw3643.pp svneol=native#text/plain
|
|||||||
tests/webtbf/tw3644.pp svneol=native#text/plain
|
tests/webtbf/tw3644.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw36554.pp svneol=native#text/pascal
|
tests/webtbf/tw36554.pp svneol=native#text/pascal
|
||||||
tests/webtbf/tw3662.pp svneol=native#text/plain
|
tests/webtbf/tw3662.pp svneol=native#text/plain
|
||||||
|
tests/webtbf/tw36631a.pp svneol=native#text/pascal
|
||||||
|
tests/webtbf/tw36631b.pp svneol=native#text/pascal
|
||||||
tests/webtbf/tw3680.pp svneol=native#text/plain
|
tests/webtbf/tw3680.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw3716.pp svneol=native#text/plain
|
tests/webtbf/tw3716.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw3738.pp svneol=native#text/plain
|
tests/webtbf/tw3738.pp svneol=native#text/plain
|
||||||
|
@ -2463,7 +2463,9 @@ implementation
|
|||||||
begin
|
begin
|
||||||
if is_dynamic_array(p1.resultdef) then
|
if is_dynamic_array(p1.resultdef) then
|
||||||
begin
|
begin
|
||||||
if (token=_ID) and not try_type_helper(p1,nil) then
|
if token=_ID then
|
||||||
|
begin
|
||||||
|
if not try_type_helper(p1,nil) then
|
||||||
begin
|
begin
|
||||||
if pattern='CREATE' then
|
if pattern='CREATE' then
|
||||||
begin
|
begin
|
||||||
@ -2481,6 +2483,14 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Message(parser_e_invalid_qualifier);
|
||||||
|
p1.destroy;
|
||||||
|
p1:=cerrornode.create;
|
||||||
|
consume(_ID);
|
||||||
|
end;
|
||||||
|
end
|
||||||
else
|
else
|
||||||
if (token<>_ID) or not try_type_helper(p1,nil) then
|
if (token<>_ID) or not try_type_helper(p1,nil) then
|
||||||
begin
|
begin
|
||||||
|
23
tests/webtbf/tw36631a.pp
Normal file
23
tests/webtbf/tw36631a.pp
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{ %FAIL }
|
||||||
|
|
||||||
|
program tw36631a;
|
||||||
|
|
||||||
|
{$APPTYPE CONSOLE}
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes,
|
||||||
|
SysUtils;
|
||||||
|
|
||||||
|
var
|
||||||
|
LongStr: String;
|
||||||
|
SingleStr: String;
|
||||||
|
|
||||||
|
begin
|
||||||
|
LongStr := 'Some example, test text. Another one, or something like that.';
|
||||||
|
|
||||||
|
SingleStr := LongStr.Split([',', '.']).[1];
|
||||||
|
writeln(SingleStr); // ' test text'
|
||||||
|
|
||||||
|
writeln('done');
|
||||||
|
end.
|
23
tests/webtbf/tw36631b.pp
Normal file
23
tests/webtbf/tw36631b.pp
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{ %FAIL }
|
||||||
|
|
||||||
|
program tw36631b;
|
||||||
|
|
||||||
|
{$APPTYPE CONSOLE}
|
||||||
|
{$mode delphi}
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes,
|
||||||
|
SysUtils;
|
||||||
|
|
||||||
|
var
|
||||||
|
LongStr: String;
|
||||||
|
SingleStr: String;
|
||||||
|
|
||||||
|
begin
|
||||||
|
LongStr := 'Some example, test text. Another one, or something like that.';
|
||||||
|
|
||||||
|
SingleStr := LongStr.Split([',', '.']).[1];
|
||||||
|
writeln(SingleStr); // ' test text'
|
||||||
|
|
||||||
|
writeln('done');
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user