浏览代码

+ allow dyn. arrays to be published, resolves #10493

git-svn-id: trunk@10870 -
florian 17 年之前
父节点
当前提交
c56c6e976c
共有 3 个文件被更改,包括 23 次插入0 次删除
  1. 1 0
      .gitattributes
  2. 6 0
      compiler/symdef.pas
  3. 16 0
      tests/webtbs/tw10493.pp

+ 1 - 0
.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

+ 6 - 0
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
 ***************************************************************************}

+ 16 - 0
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.