[Lazarus] Lazarus in trunk not working after Rev 50151 on MacOSX
lazarus at kluug.net
Tue Nov 3 20:34:30 CET 2015
On 03.11.2015 20:26, Mattias Gaertner wrote:
>> procedure Test;
>> > I: Integer;
>> > S: SmallInt;
>> > Res := I + S;
>> >Something like:
>> >I = (Integer -> longint)
>> >S = SmallInt
>> >ResultBasicType = Compare(longint, SmallInt) -> longint -> I
>> >ResultType = ResultBasicType -> I ->*Integer*
> That would fail with the following example:
> i: SizeInt;
> j: SmallInt;
> The result should be SizeInt, not Integer.
No, the result will be SizeInt, because (SizeInt -> LongInt) wins over
SmallInt and the result thus will be SizeInt (as the original type alias
of /*i*/) and not Integer.
A problem could be with such code:
Because obviously on 32bit SizeInt=longint and Integer=longint, so there
won't be a deterministic way which type wins.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus