Enum problem code first .net server / delphi client

Strange problem. Enum definition on .net server:
public enum LoginType
{
Application,
ActiveDirectory
}

Import service from URL will generates delphi interface:

LoginType = (LoginType_Application, LoginType_ActiveDirectory);

procedure LoginRequest.ReadComplex(aSerializer: TObject);
var
  __Serializer: TROSerializer;
  l_LoginType: LoginType;
  l_Password: ROUTF8String;
  l_Username: ROUTF8String;
begin
......

Compiler says: const or typedefinition expected at LoginType. And several other errors regarding TYPEINFO. If i rename LoginType to TLogintype - everything works. Whats wrong.

Delphi RIO 10.3.2
RO 10.0.0.1449

Thanks
Werner

This seems like it might be the same issue as Incompatible types: TClass and, looks like maybe we regressed something in .1449. Unfortunately my colleague Eugene who will be the best person to look at this is ours of officer today and tomorrow, but I’ll make sure this will get looked at ASAP on Wednesday.

I assume this issue is new in .1449, and art works fine in the previous release?

—marc

Don’t know about previous release. We jumped from RO Version 7 to Version 10.1449.

Ah, ok. I apologize for the inconvenience. I hope we can sort it out quickly on Wednesday; if you do need a fix sooner, I freak mend trying out the previous build (it’s safe to downgrade on top of 1449, and later upgrade back to the fixed version).

yours,
marc

no problem. We’ll wait.

1 Like

I’m afraid I will have to defer to my colleague Eugene to answer this on Wednesday, sorry :frowning:

Not yet, sorry.

Hi,

Looks like you have something like

property LoginType: LoginType read ...

in LoginRequest struct. this causes some problems with compiler.


workarounds:

  • if you used ServiceBuilder for importing .NET service
    • Tools->Escape Reserved Words in Identifiers
  • if you are used Delphi IDE for importing .NET service:
    • uncomment {.$DEFINE CODEGEN4_GENERATE_FULL_QUALIFIED_NAMES} or {.$DEFINE CODEGEN4_SCOPEDENUMS} definition in RemObjects.inc
    • rebuild BuildPackages_D26.groupproj
    • re-import .NET service

Thanks. It works this way.