Hi, On 10/19/07, Vladimir Aksenov <[EMAIL PROTECTED]> wrote: > Hi, i'm trying to compare some Delphi based sources with Lazarus and > failed (((( > Seems that i found the reason, but couldnt overcome it. > > it seems that its in type definition mechanism of FPC (maybe its tunable > but i've no ideas how) > and the folowing code fails to compile because compiler substitutes > integer instead of myInt and thinks that two following functions > matches... (and fails to compile) > ////////////////////////////////////////////////////////////////////////////////// > .... > interface > type myInt = integer;
I think it should be: type myInt = type integer; Because type myInt = integer; is just an alias for integer, while "type integer" create a new type with the range of the integer type. > > function f1(int1 : integer): integer; overload; > function f1(myint1 : myInt): integer; overload; > > implementation > > function f1(int1 : integer): integer; > begin > Result := 1; > end; > > function f1(myint1 : myInt): integer; > begin > Result := 1; > end; > .... > ////////////////////////////////////////////////////////////////////////////////// > but this behavior is definitely wrong, and i cant compile FASTGEO > library because of that. > any ideas how to compile that code ? > > With respect > Vladimir Aksenov Ido -- http://ik.homelinux.org/ _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives