From c56c6e976cd30b4b78592502b1cd9ca6aa273144 Mon Sep 17 00:00:00 2001 From: florian Date: Fri, 2 May 2008 21:15:10 +0000 Subject: [PATCH] + allow dyn. arrays to be published, resolves #10493 git-svn-id: trunk@10870 - --- .gitattributes | 1 + compiler/symdef.pas | 6 ++++++ tests/webtbs/tw10493.pp | 16 ++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 tests/webtbs/tw10493.pp diff --git a/.gitattributes b/.gitattributes index cfd3dc4804..f99eafe0b7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8099,6 +8099,7 @@ tests/webtbs/tw1044.pp svneol=native#text/plain tests/webtbs/tw10454.pp svneol=native#text/plain tests/webtbs/tw1046.pp svneol=native#text/plain tests/webtbs/tw10489.pp svneol=native#text/plain +tests/webtbs/tw10493.pp svneol=native#text/plain tests/webtbs/tw10495.pp svneol=native#text/plain tests/webtbs/tw1050.pp svneol=native#text/plain tests/webtbs/tw10519.pp svneol=native#text/plain diff --git a/compiler/symdef.pas b/compiler/symdef.pas index 6cff3f0123..1eaa832998 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -301,6 +301,7 @@ interface { returns the label of the range check string } function needs_inittable : boolean;override; property elementdef : tdef read _elementdef write setelementdef; + function is_publishable : boolean;override; end; torddef = class(tstoreddef) @@ -2402,6 +2403,11 @@ implementation end; + function tarraydef.is_publishable : boolean; + begin + Result:=ado_IsDynamicArray in arrayoptions; + end; + {*************************************************************************** tabstractrecorddef ***************************************************************************} diff --git a/tests/webtbs/tw10493.pp b/tests/webtbs/tw10493.pp new file mode 100644 index 0000000000..3a3622f126 --- /dev/null +++ b/tests/webtbs/tw10493.pp @@ -0,0 +1,16 @@ +{$mode objfpc} +program test; + +type + TStringArray = array of String; + + TBug = class + private + fSA: TStringArray; + published + property SA: TStringArray read fSA write fSA; + end; + +begin + +end.