Opened 14 years ago
Last modified 14 years ago
#1295 closed defect (fixed)
Distinct modifications that modify the same attribute are not generating an error or a warning
Reported by: | Adrian Pop | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | high | Milestone: | Red October |
Component: | Instantiation | Version: | |
Keywords: | Cc: | Adrian Pop, Adrian Pop |
Description
These models should generate an error or at least a warning.
class ArrayModification6 class A Real x[2,2]; end A; A a(x[2] = {2.1, 2.2}, x[2,1] = 13.0); end ArrayModification6;
class C1 Real x[3]; end C1; class C2 = C1(x=ones(3), x[2]=2); // Error: x[2] designated twice
class C3 class C4 Real x; end C4; // Ok, different attributes designated (unit, displayUnit and value) C4 a(x.unit = "V", x.displayUnit="mV", x=5.0); // identical to: C4 b(x(unit = "V", displayUnit="mV") = 5.0); // Not OK, modifying the same attribute unit C4 c(x(unit = "V", displayUnit="mV") = 5.0, x(unit = "K")); end C3;
Note:
See TracTickets
for help on using tickets.