Unless you are not in $mode delphi or $mode objfpc of course. Then integer is 2-byte.
Partly true. That would result in a Error: Illegal type conversion: "SmallInt" to "TObject" (assuming TObject is really a System.TObject).
Assigning a LongInt to an Integer (or vise verse) seems to work for me without a complaining compiler... so, what exactly do i have to do to receive that infamous 'error' ?
Another reason to make me think it's a typo in error report is the use of result as well that it works for TS' colleagues.
Again, nothing can be said without having seen the actual declarations, preferably a complete example that can be compiled.