Opened 9 years ago

#3836 new defect

Tuple assignment to singleton type field

Reported by: Per Östlund Owned by: Martin Sjölund
Priority: normal Milestone: Future
Component: MetaModelica Version: v1.10.0-dev-nightly
Keywords: Cc:

Description

Currently it's not possible to assign to a field of a singleton type with a function returning a tuple:

uniontype UT
  record R
    Integer x;
  end R;
end UT;

function f
  input output UT ut;
algorithm
  // Doesn't work:
  (ut.x, ...) := tuple_f(...);

  // Workaround:
  (tmp_x, ...) := tuple_f(...);
  ut.x := tmp_x;
end f;

Attachments (1)

test.mos (479 bytes ) - added by Per Östlund 9 years ago.
Test script

Download all attachments as: .zip

Change History (1)

by Per Östlund, 9 years ago

Attachment: test.mos added

Test script

Note: See TracTickets for help on using tickets.