Sign in Join

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

Mailing lists / fpc-devel / 2009-06

lone property

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Marco van de Voort

Hi,

I encountered the following FPC construct that is accepted in both objfpc and Delphi modes: (in fcl-xml/dom_html)

{$mode objfpc}
type
    myclass = class
                property doit : integer;
                end;
begin
end.

Delphi balks about it (expected: read or write)

I suspect the dom_html maintainer was just listing properties that should be there according to dom/sax spec. Note that this is not a visibility change of an earlier defined property, but a entirely new definition.

Does sb know this, and is this a feature? And if so, should delphi mode accept it ?

Reply by email

Micha Nelissen
to Marco van de Voort
Marco van de Voort wrote 7 lines
type myclass = class property doit : integer; end; Does sb know this, and is this a feature? And if so, should delphi mode accept it ?

What kind of code does fpc generate when you reference it? :-) I guess you will get a compiler error when referencing it?

Micha

Reply by email

Marco van de Voort
to Micha Nelissen

In our previous episode, Micha Nelissen said:

Show quoted text 11 lines
Marco van de Voort wrote: > type > myclass = class > property doit : integer; > end; > > Does sb know this, and is this a feature? And if so, should delphi mode > accept it ? What kind of code does fpc generate when you reference it? :-) I guess you will get a compiler error when referencing it?

Yes, a decent and clear one even:

dotest2.dpr(11,17) Error: No member is provided to access property

Reply by email