I have not yet looked at the parsing of methods of generic classes
during my work on the generics, but when I'll implement generic methods
I'll try to take a look at your problem.
Regards,
Sven
On 12.05.2011 12:37, Adrian Veith wrote:
Hi,
I try this:
type
TTestGen = class
construc
But is very strange, that this works:
type
TTestGen = class
constructor Create();
class function Test(val: T): string; inline;
end;
function Blah(const val: Integer): string; inline; //overload;
begin
Result:= IntToStr(val + 1);
end;
{function Blah(const val: string): string; inli
No for me, FPC has everything a macro could do (in a safer manner sometimes).
The current macro implementation is enough for me (I just use it to save
some typing when writing bindings with incompatible calling convention
between platforms).
--
View this message in context:
http://free-pascal-gen
Err... because at the time, T is not yet known. It would still fail to
compile even if you don't do any specialization. I guess the compiler does
type checking while parsing the generic class (and its methods) declaration,
not while specializing (well... it would still do type checking when
special
Jeppe,
Do you know if the talks there will be recorded? Could be nice :)
i don't know, i am not part of the organizing committee, but i will post
any link here.
Markus
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freep
On Thu, 12 May 2011 20:54:16 +0200 cobines wrote
> I have written the following program:
> ...
> max := 1;
> for i := 0 to max do
> vd := i / max;
A really smart compiler would notice that this in this loop the value of
vd is never examined, the loop being equivalent to