Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2010-12

forward ref of typed-alias not solved // bug?

4 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin
In the below app you get the error
project1.lpr(4,20) Error: Forward type not resolved "TOtherFoo"

Is that intended?

program Project1;
type
   TFoo = class;
   TOtherFoo = type TFoo;
   TFoo = class
     AFoo: Integer;
   end;
begin
end.

Reply by email

Jonas Maebe
to Martin
Martin wrote
In the below app you get the error project1.lpr(4,20) Error: Forward type not resolved "TOtherFoo" Is that intended?

We're at least better than Kylix:

$ dcc tt3.pp
Borland Delphi for Linux Version 14.5
Copyright (c) 1983,2002 Borland Software Corporation tt3.pp(13)
Segmentation fault

:)

But I think the error message is correct and the behaviour consistent with how you can use forward-declared classes, yes.

Jonas

Reply by email

Marco van de Voort
to Jonas Maebe

In our previous episode, Jonas Maebe said:

Show quoted text 16 lines
> In the below app you get the error > project1.lpr(4,20) Error: Forward type not resolved "TOtherFoo" > > Is that intended? We're at least better than Kylix: $ dcc tt3.pp Borland Delphi for Linux Version 14.5 Copyright (c) 1983,2002 Borland Software Corporation tt3.pp(13) Segmentation fault :) But I think the error message is correct and the behaviour consistent with how you can use forward-declared classes, yes.

Delphi XE:

Embarcadero Delphi for Win32 compiler version 22.0 Copyright (c) 1983,2010 Embarcadero Technologies, Inc. fwd.dpr(4) Error: E2086 Type 'TOtherFoo' is not yet completely defined fwd.dpr(13)

Reply by email

Paul Ishenin
to Marco van de Voort
Marco van de Voort wrote 25 lines
In our previous episode, Jonas Maebe said: >> In the below app you get the error >> project1.lpr(4,20) Error: Forward type not resolved "TOtherFoo" >> >> Is that intended? > > We're at least better than Kylix: > > $ dcc tt3.pp > Borland Delphi for Linux Version 14.5 > Copyright (c) 1983,2002 Borland Software Corporation > tt3.pp(13) > Segmentation fault > > :) > > But I think the error message is correct and the behaviour consistent with how you can use forward-declared classes, yes. Delphi XE: Embarcadero Delphi for Win32 compiler version 22.0 Copyright (c) 1983,2010 Embarcadero Technologies, Inc. fwd.dpr(4) Error: E2086 Type 'TOtherFoo' is not yet completely defined fwd.dpr(13)

Maybe add to testsuite if not present there?

Best regards,
Paul Ishenin

Reply by email