Maurice Lombardi wrote:
I have compiled gpc-20020304 with djgpp
I found a (new ?) bug given by the following simple program:
program TestSize;
type tR = object constructor init; function Size: integer; virtual; destructor fini; end;
constructor tR.init; begin end;
function tR.Size: integer; begin Size := 1 end;
destructor tR.fini; begin end;
begin end.
Compilation fails with the message:
TestSize.pas:7: duplicate field `Size' TestSize.pas:7: excess elements in record initializer after `vmt_Tr'
"Virtual" is essential. Has Size become an hidden identifier (size of the vmt ?)
In fact, it's been "unhidden", i.e. the first part of the VMT is now a properly defined type (PObjectType). I didn't notice the name conflicts when I did this. Try the following patch. (maur9.pas)
Frank