Internal errors are always bugs that need to be reported.
Indeed. It is maybe even allowed to shout a little:
Internal errors are always
bugs that
need to be reported.
Explanation:
Internal errors are errors in a code path that the compiler developers did not expect.
They are there to identify a code path by the compiler that should theoretically not be possible.
So if you encounter them, they should always be reported because they are compiler bugs and not end-user bugs.
They are considered much more serious than other bugs for that reason and will get immediate attention from the compiler dev team.
That doesn't mean that they are immediately resolved: extreme border cases that do not warrant immediate resolve or deep architectural problems.
And this is of course such a border case:
Memo.Layout.Left := (trunc(DataBand.Layout.Width) div 3) * 0; // < =================
It is a bug by itself. But the compiler should not throw an internal error for every stupid programming mistake.
- The result is always zero
- The compiler is allowed to optimize divisions to multiplications by reciprocal
The first is a programming mistake, the second is probably the cause of the internal error because of the first, a division by zero that should not be possible.