Opened 2 years ago

Closed 2 years ago

#5910 closed defect (fixed)

"Cannot resolve type of expression" when function output is given by functionals

Reported by: dariomangoni@… Owned by: perost
Priority: high Milestone: 1.16.0
Component: New Instantiation Version: v1.16.0-dev
Keywords: Cc:


Basically, this works:

function G
  input TestGTest2.FunctionsPrototypes.Gsubfun fun;
  input Real def;
  output Real f;
  f:= fun(inVal=def);
end G;

while this doesn't

function G
  input TestGTest3.FunctionsPrototypes.Gsubfun fun;
  input Real def;
  output Real f;
  f:= fun(inVal=def) + fun(inVal=def);
end G;

error is:

Cannot resolve type of expression fun(BOX(def)) + fun(BOX(def)). The operands have types #Real, #Real in component <NO_COMPONENT>.

the only change is in the output of function G.

I'm on OpenModelica v1.16.0-dev-259-g8a5138f38 on Win10 x64

See minimal example

Attachments (1) (3.1 KB) - added by dariomangoni@… 2 years ago.
minimal example

Download all attachments as: .zip

Change History (4)

Changed 2 years ago by dariomangoni@…

minimal example

comment:1 Changed 2 years ago by casella

  • Component changed from Code Generation to New Instantiation
  • Owner changed from lochel to perost
  • Status changed from new to assigned

comment:2 Changed 2 years ago by casella

  • Milestone changed from Future to 1.16.0

comment:3 Changed 2 years ago by perost

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in 98a8dbc.

Note: See TracTickets for help on using tickets.