Opened 14 years ago

Last modified 13 years ago

#1561 closed defect (wontfix)

Non-returning MetaModelica function with list output returns 0

Reported by: Per Östlund Owned by: Per Östlund
Priority: normal Milestone:
Component: Version:
Keywords: Cc: Per Östlund, Martin Sjölund

Description

This MetaModelica code:

package test;  
  function f 
    output list<String> outString;
  end f;

  constant list<String> s = f();
end test;

produces this output:

function test.f
  output list<String> outString;
end test.f;

class test
  constant list<String> s = 0;
end test;

I don't really know what's supposed to happen if a function doesn't return anything in MetaModelica, but assigning a list to 0 seems wrong.

Change History (1)

comment:1 by Martin Sjölund, 14 years ago

The result is almost sane. Boxed 0x00 is the integer zero. The problem is that there is no check for unassigned outputs...

Note: See TracTickets for help on using tickets.