* a property access list must only consist of record or object fields; classes are not allowed

git-svn-id: trunk@40656 -
This commit is contained in:
svenbarth 2018-12-26 11:26:01 +00:00
parent 4afe3c6788
commit 539ed761ba
4 changed files with 56 additions and 0 deletions

2
.gitattributes vendored
View File

@ -11084,6 +11084,8 @@ tests/tbf/tb0262.pp svneol=native#text/pascal
tests/tbf/tb0263.pp svneol=native#text/pascal
tests/tbf/tb0264.pp svneol=native#text/pascal
tests/tbf/tb0265.pp svneol=native#text/pascal
tests/tbf/tb0266a.pp svneol=native#text/pascal
tests/tbf/tb0266b.pp svneol=native#text/pascal
tests/tbf/tb0588.pp svneol=native#text/pascal
tests/tbf/ub0115.pp svneol=native#text/plain
tests/tbf/ub0149.pp svneol=native#text/plain

View File

@ -132,6 +132,8 @@ implementation
end;
_POINT :
begin
if not is_object(def) and not is_record(def) then
message(sym_e_type_must_be_rec_or_object);
consume(_POINT);
if assigned(def) then
begin

24
tests/tbf/tb0266a.pp Normal file
View File

@ -0,0 +1,24 @@
{ %FAIL }
unit tb0266a;
{$mode objfpc}{$H+}
interface
type
TTest1 = class
fTest: String;
end;
TTest2 = class
private
fTest: TTest1;
public
property Test: String read fTest.fTest;
end;
implementation
end.

28
tests/tbf/tb0266b.pp Normal file
View File

@ -0,0 +1,28 @@
{ %FAIL }
unit tb0266b;
{$mode objfpc}{$H+}
interface
type
TTest1 = class
fTest: String;
end;
TTest2 = record
fTest: TTest1;
end;
TTest3 = class
private
fTest: TTest2;
public
property Test: String read fTest.fTest.fTest;
end;
implementation
end.