Browse Source

* new bug

git-svn-id: trunk@651 -
peter 20 years ago
parent
commit
8bd757c5ed
2 changed files with 32 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 31 0
      tests/webtbf/tw4104.pp

+ 1 - 0
.gitattributes

@@ -5490,6 +5490,7 @@ tests/webtbf/tw3790.pp svneol=native#text/plain
 tests/webtbf/tw3841.pp svneol=native#text/plain
 tests/webtbf/tw3969.pp svneol=native#text/plain
 tests/webtbf/tw4103.pp svneol=native#text/plain
+tests/webtbf/tw4104.pp svneol=native#text/plain
 tests/webtbf/tw4111.pp svneol=native#text/plain
 tests/webtbf/tw4139.pp svneol=native#text/plain
 tests/webtbf/tw4144.pp svneol=native#text/plain

+ 31 - 0
tests/webtbf/tw4104.pp

@@ -0,0 +1,31 @@
+{ Source provided for Free Pascal Bug Report 4104 }
+{ Submitted by "Daniël Mantione" on  2005-06-22 }
+{ e-mail: [email protected] }
+program bug;
+
+type junk=record
+       data:ansistring;
+     end;
+
+operator :=(x:longint) result:junk;
+
+begin
+  str(x,result.data);
+end;
+
+procedure write_junk(const data:array of junk);
+
+var i:cardinal;
+
+begin
+  for i:=low(data) to high(data) do
+   begin
+     write(data[i].data);
+     write('<-->');
+     writeln(Pchar(data[i].data));
+   end;
+end;
+
+begin
+  write_junk([1,2]);
+end.