<p>Am 12.04.2016 08:57 schrieb "Maciej Izak" <<a href="mailto:hnb.code@gmail.com">hnb.code@gmail.com</a>>:<br>
><br>
> 2016-04-11 23:36 GMT+02:00 Sven Barth <<a href="mailto:pascaldragon@googlemail.com">pascaldragon@googlemail.com</a>>:<br>
>><br>
>> I know this is a rather constructed example, but it's similar to the C++<br>
>> code we had at work, so it's code that can happen in the real world.<br>
>> If we don't find a way to solve this problem then I'm afraid that I<br>
>> won't include your changes in trunk, cause I don't want to open that can<br>
>> of worms.<br>
><br>
><br>
> Eeeee? I am a little shocked by your arguments because that kind of bug is possible since we have initialization/finalization section and uses section in interface/implementation section. *The programmer must be aware of*. The mentioned bugs are here a looong time. For example fixed by me for Lazarus: <a href="http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&root=lazarus&sortby=date&revision=49547">http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&root=lazarus&sortby=date&revision=49547</a><br>
></p>
<p>That might be, but this just adds a new category of possibilities for such bugs and that is something that we should not do, especially one as subtle as this.</p>
<p>One possible solution would be to disallow records with management operators for global variables (variables created for Default() might be an exception here, but I'd need to think that through).</p>
<p>Regards,<br>
Sven</p>