diff options
author | svenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2018-12-26 11:26:01 +0000 |
---|---|---|
committer | svenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2018-12-26 11:26:01 +0000 |
commit | 8408331be99b0c518c904e0422ab2c7a17ba7e99 (patch) | |
tree | f12a289fb27644f1e505231fa25f19dc7adc9394 /tests/tbf | |
parent | 9eb54b8e00a88c142fdc7f72ffec65a4575195de (diff) | |
download | fpc-8408331be99b0c518c904e0422ab2c7a17ba7e99.tar.gz |
* a property access list must only consist of record or object fields; classes are not allowed
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@40656 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests/tbf')
-rw-r--r-- | tests/tbf/tb0266a.pp | 24 | ||||
-rw-r--r-- | tests/tbf/tb0266b.pp | 28 |
2 files changed, 52 insertions, 0 deletions
diff --git a/tests/tbf/tb0266a.pp b/tests/tbf/tb0266a.pp new file mode 100644 index 0000000000..aaee1bdee7 --- /dev/null +++ b/tests/tbf/tb0266a.pp @@ -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. + diff --git a/tests/tbf/tb0266b.pp b/tests/tbf/tb0266b.pp new file mode 100644 index 0000000000..2c2b72ee0b --- /dev/null +++ b/tests/tbf/tb0266b.pp @@ -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. + |