Opened 14 years ago

Last modified 10 years ago

#1427 assigned defect

Assignment of continuous signals to discrete variables should be rejected

Reported by: sjoelund.se Owned by: lochel
Priority: high Milestone: Future
Component: Backend Version:
Keywords: Cc: sjoelund.se

Description (last modified by sjoelund.se)

Both of the following work, but should not:

class A
  Integer i = integer(time);
  discrete Real r = time;
end A;

Note that in a function, an assignment i := r; should still be allowed since in a function, all changes are discrete or continuous depending on your viewpoint. There probably will not be problems with inline functions since the variability of the call is simply the highest variability of the inputs.

(3.8 Variability of Expressions "If v is a discrete-time component then expr needs to be a discrete-time expression.")

Change History (2)

comment:1 Changed 11 years ago by sjoelund.se

  • Cc changed from sjoelund.se, to sjoelund.se
  • Component set to Backend
  • Description modified (diff)

comment:2 Changed 10 years ago by sjoelund.se

  • Milestone set to Future
  • Owner changed from sjoelund.se to lochel
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.