[fpc-devel] A more fundamental problem Re: i36507
J. Gareth Moreton
gareth at moreton-family.com
Fri Jan 3 10:45:50 CET 2020
Hi everyone,
So I reported this morning that Lazarus no longer builds as of r43826.
Ondrej was quick to update the Lazarus sources to allow it to build
again and marking the issue as fixed, but the underlying regression in
the Free Pascal Compiler still exists.
Basically, the compiler failed on constructs like this
with
InputHistories.HistoryLists.GetList('BuildExecBefore',true,rltCaseSensitive)
do begin
Assign(ExecuteBeforeCommandComboBox.Items);
Push(Options.ExecuteBefore.Command);
end;
The fix was to replace it with the following
(ide/frames/compiler_compilation_options.pas - line 394):
HL :=
InputHistories.HistoryLists.GetList('BuildExecBefore',true,rltCaseSensitive);
HL.Assign(ExecuteBeforeCommandComboBox.Items);
HL.Push(Options.ExecuteBefore.Command);
Given the "illegal qualifier" errors that appeared, I'm guessing the
issue is that "Options" is also a property of the THistoryList class as
well as a local variable. Technically speaking though, this is a
regression unless it's to be documented (and hence break backward
compatibility) that if you have a property and a local variable of the
same name, the property takes precedence.
Gareth aka. Kit
More information about the fpc-devel
mailing list