Bläddra i källkod

* set an owner for open array defs being created in property declarations, resolves #25769

git-svn-id: trunk@38348 -
florian 7 år sedan
förälder
incheckning
14cb60e479
4 ändrade filer med 50 tillägg och 0 borttagningar
  1. 2 0
      .gitattributes
  2. 1 0
      compiler/pdecvar.pas
  3. 23 0
      tests/webtbf/tw25769.pp
  4. 24 0
      tests/webtbs/tw25769a.pp

+ 2 - 0
.gitattributes

@@ -14305,6 +14305,7 @@ tests/webtbf/tw25504.pp svneol=native#text/plain
 tests/webtbf/tw2562.pp svneol=native#text/plain
 tests/webtbf/tw25622.pp svneol=native#text/plain
 tests/webtbf/tw25622a.pp svneol=native#text/plain
+tests/webtbf/tw25769.pp svneol=native#text/pascal
 tests/webtbf/tw25788.pp svneol=native#text/pascal
 tests/webtbf/tw25861.pp svneol=native#text/plain
 tests/webtbf/tw25862.pp svneol=native#text/plain
@@ -15567,6 +15568,7 @@ tests/webtbs/tw2561.pp svneol=native#text/plain
 tests/webtbs/tw25610.pp -text svneol=native#text/plain
 tests/webtbs/tw25685.pp svneol=native#text/pascal
 tests/webtbs/tw25703.pp svneol=native#text/plain
+tests/webtbs/tw25769a.pp svneol=native#text/pascal
 tests/webtbs/tw25781.pp svneol=native#text/plain
 tests/webtbs/tw25814.pp svneol=native#text/plain
 tests/webtbs/tw25869.pp svneol=native#text/plain

+ 1 - 0
compiler/pdecvar.pas

@@ -415,6 +415,7 @@ implementation
                         consume(_OF);
                         { define range and type of range }
                         hdef:=carraydef.create(0,-1,s32inttype);
+                        hdef.owner:=astruct.symtable;
                         { define field type }
                         single_type(arraytype,[]);
                         tarraydef(hdef).elementdef:=arraytype;

+ 23 - 0
tests/webtbf/tw25769.pp

@@ -0,0 +1,23 @@
+{ %fail }
+unit tw25769;
+
+{$mode objfpc}{$H+}
+
+interface
+
+type
+  TDbgSymbolValue = class(TObject)
+  protected
+    function GetMemberCountEx(AIndex: array of Integer): Integer;
+  public
+    property MemberCountEx[AIndex: array of Integer]: Integer read GetMemberCountEx;
+  end;
+
+
+implementation
+
+function TDbgSymbolValue.GetMemberCountEx(AIndex: Integer): Integer;
+begin
+end;
+
+end.

+ 24 - 0
tests/webtbs/tw25769a.pp

@@ -0,0 +1,24 @@
+{ %norun }
+unit tw25769a;
+
+{$mode objfpc}{$H+}
+
+interface
+
+type
+  TDbgSymbolValue = class(TObject)
+  protected
+    function GetMemberCountEx(AIndex: array of Integer): Integer;
+  public
+    property MemberCountEx[AIndex: array of Integer]: Integer read GetMemberCountEx;
+  end;
+
+
+implementation
+
+function TDbgSymbolValue.GetMemberCountEx(AIndex: array of Integer): Integer;
+begin
+  result:=0;
+end;
+
+end.