<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">J. Gareth Moreton <<a href="mailto:gareth@moreton-family.com">gareth@moreton-family.com</a>> schrieb am Fr., 3. Jan. 2020, 10:45:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone,<br>
<br>
So I reported this morning that Lazarus no longer builds as of r43826.  <br>
Ondrej was quick to update the Lazarus sources to allow it to build <br>
again and marking the issue as fixed, but the underlying regression in <br>
the Free Pascal Compiler still exists.<br>
<br>
Basically, the compiler failed on constructs like this<br>
<br>
   with <br>
InputHistories.HistoryLists.GetList('BuildExecBefore',true,rltCaseSensitive) <br>
do begin<br>
     Assign(ExecuteBeforeCommandComboBox.Items);<br>
     Push(Options.ExecuteBefore.Command);<br>
   end;<br>
<br>
The fix was to replace it with the following <br>
(ide/frames/compiler_compilation_options.pas - line 394):<br>
<br>
   HL := <br>
InputHistories.HistoryLists.GetList('BuildExecBefore',true,rltCaseSensitive);<br>
   HL.Assign(ExecuteBeforeCommandComboBox.Items);<br>
   HL.Push(Options.ExecuteBefore.Command);<br>
<br>
Given the "illegal qualifier" errors that appeared, I'm guessing the <br>
issue is that "Options" is also a property of the THistoryList class as <br>
well as a local variable.  Technically speaking though, this is a <br>
regression unless it's to be documented (and hence break backward <br>
compatibility) that if you have a property and a local variable of the <br>
same name, the property takes precedence.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">This is simply how "with" works and one of the reasons why it is not considered good or safe by many. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>