Sign in Join

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

Mailing lists / fpc-devel / 2026-07

CORBA and GUID => changes?

6 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Martin Frb

According to
https://forum.lazarus.freepascal.org/index.php?topic=74492

corba interfaces without guid no longe compile?

If so, why?

e.g. a base "class" (interface), that is never derived from a class

something like ...

type
   base = interface ... end
   foo = interface(base) [guid] .. end;
var x: base;
x := obj as foo;

Also, afaik corbo interfaces worked reliable without guid **IF** the were only done at compile time.

That is only

var abc: TObjectThatIsDeclaredWithFoo;
   x := abc as foo; // done at compile time
NEVER:
var abc: TObject; // only instance will know
   x := abc as foo;

Reply by email

Hairy Pixels
to Martin Frb: According to https://forum.lazarus.freepascal.org/index.php?topic=74492 corba interfaces…

On Jul 31, 2026 at 7:29:46 AM, Martin Frb via fpc-devel <

Show quoted text 9 lines
wrote: According to https://forum.lazarus.freepascal.org/index.php?topic=74492 corba interfaces without guid no longe compile? If so, why?

It makes no sense from a practical standpoint because as you noted they work just fine at compile time without a GUID. I bet the compiler team was following some spec for how CORBA interfaces are supposed to work.

This will just be a waste of time and add needless text in my files. Hopefully they can find some middle ground and give us a way back to compile-time only interfaces.

Reply by email

Sven Barth
to Martin Frb: According to https://forum.lazarus.freepascal.org/index.php?topic=74492 corba interfaces…

Martin Frb via fpc-devel schrieb am Fr.,
31. Juli 2026, 15:29:

Show quoted text 5 lines
According to https://forum.lazarus.freepascal.org/index.php?topic=74492 corba interfaces without guid no longe compile?

Please check correctly: CORBA/raw interfaces without name do still compile, just like Com interfaces without GUID do compile, however you can no longer use "as" to convert a class to such an interface.

If so, why?

a) this is consistent with the behavior of casting such an interface to string (you also can't use "as" to convert to a COM interface without GUID) b) it could lead to subtle errors if a class implements multiple such interfaces, cause TObject.GetInterface will pick the first matching interface by name which without name will simply be the first one without a name.

Regards,
Sven

Reply by email

Hairy Pixels
to Sven Barth

On Jul 31, 2026 at 11:54:04 AM, Sven Barth via fpc-devel <

Show quoted text 15 lines
wrote: Please check correctly: CORBA/raw interfaces without name do still compile, just like Com interfaces without GUID do compile, however you can no longer use "as" to convert a class to such an interface. Martin Frb via fpc-devel schrieb am Fr., 31. Juli 2026, 15:29: > According to > https://forum.lazarus.freepascal.org/index.php?topic=74492 > > corba interfaces without guid no longe compile? >

does this apply to casting/implicit conversions like ISomeInterface(someClass)? I don't think i've ever noticed that fails even with multiple interfaces on the class. I thought it was just checking the pointers but I would expect Supports to fail.

Reply by email

Martin Frb
to Sven Barth: Martin Frb via fpc-devel schrieb am Fr., 31. Juli 2026, 15:29: Please check correctly:…
Sven Barth wrote 10 lines
Martin Frb via fpc-devel schrieb am Fr., 31. Juli 2026, 15:29: According to https://forum.lazarus.freepascal.org/index.php?topic=74492 corba interfaces without guid no longe compile? Please check correctly:

Sorry, I just picked it up from the forum, and hadn't time to upgrade my fpc and start playing..

CORBA/raw interfaces without name do still compile, just like Com interfaces without GUID do compile, however you can no longer use "as" to convert a class to such an interface.

Ok, I was mainly worried about the inheritance case.

Also, see my other mail,  (if name = GUID) then the compiler rejects now cases that do have a guid. (maybe due to forward declare). Don't know yet.

Reply by email