Re: [fpc-pascal] Generics: constructor restriction fail

2014-11-13 Thread silvioprog
On Tue, Nov 11, 2014 at 7:08 PM, Chriss Kalogeropoulos < iz.iznog...@gmail.com> wrote: > Hi all, > > I am not sure about the constructor case but I consider the FPC > implementation of generics much more powerful than Delphi's assuming that > Sven's comment actually works as expected. > The fact t

Re: [fpc-pascal] Generics: constructor restriction fail

2014-11-11 Thread Chriss Kalogeropoulos
Hi all, I am not sure about the constructor case but I consider the FPC implementation of generics much more powerful than Delphi's assuming that Sven's comment actually works as expected. The fact that the method invocation is actually checked on specialization and not on declaration means that s

Re: [fpc-pascal] Generics: constructor restriction fail

2014-11-11 Thread silvioprog
On Sat, Nov 1, 2014 at 9:04 AM, Sven Barth wrote: > On 31.10.2014 00:04, silvioprog wrote: > >> Hello, >> >> Following this article: >> >> http://alex.ciobanu.org/?p=51 >> >> The compiler does not check the constructor restriction. >> >> Try this test: >> >> {$mode delphi} >> >>TTest = class

Re: [fpc-pascal] Generics: constructor restriction fail

2014-11-01 Thread Sven Barth
On 31.10.2014 00:04, silvioprog wrote: Hello, Following this article: http://alex.ciobanu.org/?p=51 The compiler does not check the constructor restriction. Try this test: {$mode delphi} TTest = class private // hidding the constructor to cause a compiler error constructor Create

[fpc-pascal] Generics: constructor restriction fail

2014-10-30 Thread silvioprog
Hello, Following this article: http://alex.ciobanu.org/?p=51 The compiler does not check the constructor restriction. Try this test: {$mode delphi} TTest = class private // hidding the constructor to cause a compiler error constructor Create; end; TGen = class end; constructor