Sign in Join

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

Mailing lists / fpc-devel / 2002-08

interface inheritance (dom2) bug???

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Uwe Fechner

Hello,

I try to port my libxml2 wrapper for delphi to freepascal. I have the following problem:

If I compile the following code:

Show quoted text 29 lines
unit idom2; interface uses SysUtils; type DomString = WideString; IDomElement = interface; IDomNode = interface ['{D415EB3C-463D-4F6D-BD1F-168B8A364666}'] {property setters/getters} function get_LocalName : DomString; property localName : DomString read get_LocalName; end; IDomElement = interface(IDomNode) ['{955D5EEC-6160-4AC9-ADFB-767E6AC09511}'] function getAttributeNS( const namespaceURI : DomString; const localName : DomString) : DomString; end; end.

I get the following error message:

Error: dublicate identifier "localName".
Hint: Identifier already defined in line 18.

I am using the snapshot of freepascal 1.1 from 18.08.2002. And I am using the IDE Dev-Pascal 1.9.2.

Is this a bug in freepascal, or in Dev-Pascal, or not?

This code compiles fine with delphi and kylix.

Regards:

Uwe Fechner

Reply by email

Peter Vreman
Show quoted text 41 lines
Hello, I try to port my libxml2 wrapper for delphi to freepascal. I have the following problem: If I compile the following code: > unit idom2; > interface > uses > SysUtils; > type > DomString = WideString; > IDomElement = interface; > IDomNode = interface > ['{D415EB3C-463D-4F6D-BD1F-168B8A364666}'] > {property setters/getters} > function get_LocalName : DomString; > property localName : DomString read get_LocalName; > end; > IDomElement = interface(IDomNode) > ['{955D5EEC-6160-4AC9-ADFB-767E6AC09511}'] > function getAttributeNS( > const namespaceURI : DomString; > const localName : DomString) : DomString; > end; > end. I get the following error message: Error: dublicate identifier "localName". Hint: Identifier already defined in line 18.

Did you try using the -Sd flag to switch to delphi compatibility mode?

Reply by email