#1 2014-08-26 19:54:59

Sabbiolina
Member
Registered: 2014-05-20
Posts: 120

[CrossPlatform generator] parameter qualifiers: var / out problem

Look at this:

server:
  ICalculator = interface(IInvokable)
    ['{9A60C8ED-CEB2-4E09-87D4-4A16F496E5FF}']
    function Add(n1,n2: integer): integer;
    function list(tag:string;var tagList:TTaglist):string;
  end;


generated:

type
  /// service implemented by TServiceCalculator
  // - you can access this service as such:
  // !var aCalculator: ICalculator;
  // !begin
  // !   aCalculator := TCalculator.Create(aClient);
  // !   // now you can use aCalculator methods
  // !...
  ICalculator = interface(IServiceAbstract)
    ['{9A60C8ED-CEB2-4E09-87D4-4A16F496E5FF}']
    function Add(const n1: integer; const n2: integer): integer;
    function list(const tag: string; var tagList: TTagList): string;
  end;

----------------

Change VAR in OUT and...

server:
  TServiceCalculator = class(TInterfacedObject, ICalculator)
  public
    function Add(n1,n2: integer): integer;
    function list(tag:string;out tagList:TTaglist):string;
  end;


generated
type
  /// service implemented by TServiceCalculator
  // - you can access this service as such:
  // !var aCalculator: ICalculator;
  // !begin
  // !   aCalculator := TCalculator.Create(aClient);
  // !   // now you can use aCalculator methods
  // !...
  ICalculator = interface(IServiceAbstract)
    ['{9A60C8ED-CEB2-4E09-87D4-4A16F496E5FF}']
    function Add(const n1: integer; const n2: integer): integer;
    function list(const tag: stringout tagList: TTagList): string; //<-------------------------------------- lost ;
  end;

tested with xe2 e xe6upd1


obviously adding ";" everything works

Offline

#2 2014-08-27 17:24:18

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: [CrossPlatform generator] parameter qualifiers: var / out problem

Oups...

Should be fixed now by http://synopse.info/fossil/info/860cd1658b

Thanks for the report!

Offline

#3 2014-08-28 06:52:06

Sabbiolina
Member
Registered: 2014-05-20
Posts: 120

Re: [CrossPlatform generator] parameter qualifiers: var / out problem

HI AB,
there is probably a problem of synchronization in the nightlyBuild.
the mormot.pas is out of date

http://synopse.info/fossil/artifact/946 … 3c1bfee2bb size: 1.652.524
in nightlyBuild size: 1.652.402

Offline

#4 2014-08-28 07:07:25

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: [CrossPlatform generator] parameter qualifiers: var / out problem

I do not know what you are saying...
1.652.402 is the correct size: updated version is a bit shorter, as expected.
This http://synopse.info/fossil/info/18cb31c55f32 commit is correct.

Offline

#5 2014-08-28 07:36:45

Sabbiolina
Member
Registered: 2014-05-20
Posts: 120

Re: [CrossPlatform generator] parameter qualifiers: var / out problem

Unfortunately, the result is the same:

    function list(const tag: stringout tagList: TTagList): string;

from:

  ICalculator = interface(IInvokable)
    ['{9A60C8ED-CEB2-4E09-87D4-4A16F496E5FF}']
    function Add(n1,n2: integer): integer;
    function list(tag:string;out tagList:TTaglist):string;
  end;

I send the project for testing in mail

Offline

#6 2014-08-28 08:40:39

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: [CrossPlatform generator] parameter qualifiers: var / out problem

I suspect you did not update the .mustache files.

Offline

#7 2014-08-28 09:00:19

Sabbiolina
Member
Registered: 2014-05-20
Posts: 120

Re: [CrossPlatform generator] parameter qualifiers: var / out problem

you are rigth

sorry

Offline

Board footer

Powered by FluxBB