Opened 14 years ago
Last modified 10 years ago
#1427 assigned defect
Assignment of continuous signals to discrete variables should be rejected
Reported by: | Martin Sjölund | Owned by: | Lennart Ochel |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Backend | Version: | |
Keywords: | Cc: | Martin Sjölund |
Description (last modified by )
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 by , 12 years ago
Cc: | sjoelund.se, → sjoelund.se |
---|---|
Component: | → Backend |
Description: | modified (diff) |
comment:2 by , 10 years ago
Milestone: | → Future |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Note:
See TracTickets
for help on using tickets.