mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 07:49:12 +02:00
* 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:
parent
4afe3c6788
commit
539ed761ba
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -11084,6 +11084,8 @@ tests/tbf/tb0262.pp svneol=native#text/pascal
|
|||||||
tests/tbf/tb0263.pp svneol=native#text/pascal
|
tests/tbf/tb0263.pp svneol=native#text/pascal
|
||||||
tests/tbf/tb0264.pp svneol=native#text/pascal
|
tests/tbf/tb0264.pp svneol=native#text/pascal
|
||||||
tests/tbf/tb0265.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/tb0588.pp svneol=native#text/pascal
|
||||||
tests/tbf/ub0115.pp svneol=native#text/plain
|
tests/tbf/ub0115.pp svneol=native#text/plain
|
||||||
tests/tbf/ub0149.pp svneol=native#text/plain
|
tests/tbf/ub0149.pp svneol=native#text/plain
|
||||||
|
@ -132,6 +132,8 @@ implementation
|
|||||||
end;
|
end;
|
||||||
_POINT :
|
_POINT :
|
||||||
begin
|
begin
|
||||||
|
if not is_object(def) and not is_record(def) then
|
||||||
|
message(sym_e_type_must_be_rec_or_object);
|
||||||
consume(_POINT);
|
consume(_POINT);
|
||||||
if assigned(def) then
|
if assigned(def) then
|
||||||
begin
|
begin
|
||||||
|
24
tests/tbf/tb0266a.pp
Normal file
24
tests/tbf/tb0266a.pp
Normal 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
28
tests/tbf/tb0266b.pp
Normal 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.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user