Re: [lazarus] Code Completion don't understand new generic sintax
Thanks Mattias, good and great job!!!. 2007/8/16, Mattias Gaertner <[EMAIL PROTECTED]>: > > On Wed, 15 Aug 2007 18:05:18 -0300 > "Carlos German Tejero" <[EMAIL PROTECTED]> wrote: > > > Hi to Lazarus Team (sorry for my poor english): > > > > I probe the new FPC generic support, and work fine, but the Lazarus > > Code Completion don't understand new generic sintax. For example in > > the next code: > > > > > > program test; > > > > {$apptype console} > > {$mode objfpc}{$H+} > > > > uses > > SysUtils, Classes; > > > > type > > generic TTest = class(TObject) > > function sum(a,b:TDato):TDato; > > end; > > > > TIntTest = specialize TTest; > > > > TStrTest = specialize TTest; > > > > function TTest.sum(a,b:TDato):TDato; > > begin > > Result := a + b; > > end; > > > > var > > it:TIntTest; > > st:TStrTest; > > i:integer; > > s:string; > > > > begin > > it := TIntTest.Create; > > i := it.sum(1,2); > > it.Free; > > WriteLn(i); > > > > end. > > > > when i write "it := TIntTest." and press CRTL+SPACE, i got the next > > error in the messages window: > > > > "test.lpr(10,11) Error: = expected, but TTest found" > > > > i'm using Lazarus 0.9.23 Beta SVN:11793 x86_64-win64-win32/win64 > > on WindowsXP 64. > > I implemented some basic things, like parsing and simple find > declaration for generics. Please update svn and test. > > > Mattias > > _ > To unsubscribe: mail [EMAIL PROTECTED] with >"unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives > -- Carlos Germán Tejero
Re: [lazarus] Code Completion don't understand new generic sintax
On Wed, 15 Aug 2007 18:05:18 -0300 "Carlos German Tejero" <[EMAIL PROTECTED]> wrote: > Hi to Lazarus Team (sorry for my poor english): > > I probe the new FPC generic support, and work fine, but the Lazarus > Code Completion don't understand new generic sintax. For example in > the next code: > > > program test; > > {$apptype console} > {$mode objfpc}{$H+} > > uses > SysUtils, Classes; > > type > generic TTest = class(TObject) > function sum(a,b:TDato):TDato; > end; > > TIntTest = specialize TTest; > > TStrTest = specialize TTest; > > function TTest.sum(a,b:TDato):TDato; > begin > Result := a + b; > end; > > var > it:TIntTest; > st:TStrTest; > i:integer; > s:string; > > begin > it := TIntTest.Create; > i := it.sum(1,2); > it.Free; > WriteLn(i); > > end. > > when i write "it := TIntTest." and press CRTL+SPACE, i got the next > error in the messages window: > > "test.lpr(10,11) Error: = expected, but TTest found" > > i'm using Lazarus 0.9.23 Beta SVN:11793 x86_64-win64-win32/win64 > on WindowsXP 64. I implemented some basic things, like parsing and simple find declaration for generics. Please update svn and test. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Code Completion don't understand new generic sintax
Hi to Lazarus Team (sorry for my poor english): I probe the new FPC generic support, and work fine, but the Lazarus Code Completion don't understand new generic sintax. For example in the next code: program test; {$apptype console} {$mode objfpc}{$H+} uses SysUtils, Classes; type generic TTest = class(TObject) function sum(a,b:TDato):TDato; end; TIntTest = specialize TTest; TStrTest = specialize TTest; function TTest.sum(a,b:TDato):TDato; begin Result := a + b; end; var it:TIntTest; st:TStrTest; i:integer; s:string; begin it := TIntTest.Create; i := it.sum(1,2); it.Free; WriteLn(i); end. when i write "it := TIntTest." and press CRTL+SPACE, i got the next error in the messages window: "test.lpr(10,11) Error: = expected, but TTest found" i'm using Lazarus 0.9.23 Beta SVN:11793 x86_64-win64-win32/win64 on WindowsXP 64. Thanks!!! -- Carlos Germán Tejero