Browse Source

* fix refcount for 1.9.x

peter 21 years ago
parent
commit
a94a628fcf
1 changed files with 5 additions and 3 deletions
  1. 5 3
      tests/webtbs/tw2911.pp

+ 5 - 3
tests/webtbs/tw2911.pp

@@ -1,3 +1,5 @@
+{ %version=1.1 }
+
 { Source provided for Free Pascal Bug Report 2911 }
 { Source provided for Free Pascal Bug Report 2911 }
 { Submitted by "Chris Hilder" on  2004-01-19 }
 { Submitted by "Chris Hilder" on  2004-01-19 }
 { e-mail: [email protected] }
 { e-mail: [email protected] }
@@ -51,9 +53,6 @@ begin
         twostring := 'two';
         twostring := 'two';
         ARecordWithStrings.one := onestring + twostring;
         ARecordWithStrings.one := onestring + twostring;
         twostring := onestring + twostring;
         twostring := onestring + twostring;
-        RefCount(ARecordWithStrings.one,1);
-        ARecordWithStrings := FunctionResultIsRecord(ARecordWithStrings);
-        twostring := onestring + twostring;
         RefCount(ARecordWithStrings.one,2);
         RefCount(ARecordWithStrings.one,2);
         ARecordWithStrings := FunctionResultIsRecord(ARecordWithStrings);
         ARecordWithStrings := FunctionResultIsRecord(ARecordWithStrings);
         twostring := onestring + twostring;
         twostring := onestring + twostring;
@@ -61,4 +60,7 @@ begin
         ARecordWithStrings := FunctionResultIsRecord(ARecordWithStrings);
         ARecordWithStrings := FunctionResultIsRecord(ARecordWithStrings);
         twostring := onestring + twostring;
         twostring := onestring + twostring;
         RefCount(ARecordWithStrings.one,4);
         RefCount(ARecordWithStrings.one,4);
+        ARecordWithStrings := FunctionResultIsRecord(ARecordWithStrings);
+        twostring := onestring + twostring;
+        RefCount(ARecordWithStrings.one,5);
 end.
 end.