<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 02.11.2015 20:08, Sven Barth wrote:<br>
</div>
<blockquote cite="mid:5637B4BE.7000104@googlemail.com" type="cite">It's
not a general compiler bug, but only in relationship with helpers
(I can't trigger it if I have a class constructed that way without
a helper). </blockquote>
<br>
It is a general compiler bug. Not even related to a for-in or
anything else.<br>
See:<br>
<br>
<b><tt>program arraypropbug;</tt></b><b><tt><br>
</tt></b><b><tt><br>
</tt></b><b><tt>uses</tt></b><b><tt><br>
</tt></b><b><tt> sysutils;</tt></b><b><tt><br>
</tt></b><b><tt><br>
</tt></b><b><tt>type</tt></b><b><tt><br>
</tt></b><b><tt> TObj = class</tt></b><b><tt><br>
</tt></b><b><tt> public</tt></b><b><tt><br>
</tt></b><b><tt> function GetS(Index: Integer): string;
overload;</tt></b><b><tt><br>
</tt></b><b><tt> function GetS(Index1, Index2: Integer):
Double; overload;</tt></b><b><tt><br>
</tt></b><b><tt> property S[Index: Integer]: string read GetS;</tt></b><b><tt><br>
</tt></b><b><tt> end;</tt></b><b><tt><br>
</tt></b><b><tt><br>
</tt></b><b><tt>{ TObj }</tt></b><b><tt><br>
</tt></b><b><tt><br>
</tt></b><b><tt>function TObj.GetS(Index1, Index2: Integer):
Double;</tt></b><b><tt><br>
</tt></b><b><tt>begin</tt></b><b><tt><br>
</tt></b><b><tt> Result := Index1 / Index2;</tt></b><b><tt><br>
</tt></b><b><tt>end;</tt></b><b><tt><br>
</tt></b><b><tt><br>
</tt></b><b><tt>function TObj.GetS(Index: Integer): string;</tt></b><b><tt><br>
</tt></b><b><tt>begin</tt></b><b><tt><br>
</tt></b><b><tt> Result := IntToStr(Index);</tt></b><b><tt><br>
</tt></b><b><tt>end;</tt></b><b><tt><br>
</tt></b><b><tt><br>
</tt></b><b><tt>var</tt></b><b><tt><br>
</tt></b><b><tt> o: TObj;</tt></b><b><tt><br>
</tt></b><b><tt> d: Double;</tt></b><b><tt><br>
</tt></b><b><tt>begin</tt></b><b><tt><br>
</tt></b><b><tt> o := TObj.Create;</tt></b><b><tt><br>
</tt></b><b><tt> d := o.S[10, 3]; // !!!</tt></b><b><tt><br>
</tt></b><b><tt> Writeln(d);</tt></b><b><tt><br>
</tt></b><b><tt>end.</tt></b><b><tt><br>
</tt></b><br>
Ondrej<br>
</body>
</html>