Opened 15 years ago
Last modified 15 years ago
#1138 closed defect (fixed)
Type mismatch in modifiers when extending Real (from MathCore)
Reported by: | Jan Brugård | Owned by: | Jan Brugård |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | Jan Brugård, Per Östlund |
Description
See this models:
type Real2 extends Real; end Real2;
type Axis= Real2[3];
model test parameter Axis n={0,-1,0}; end test;
The error message for the model test is:
--- [185] 14:24:48 Validation of class test --- Check of test failed Error: Type mismatch in modifier, expected type (Real2 type bc:Real), got modifier ={0,-1,0} of type Integer[3] Error: Error occured while flattening model test
There is some problems with extending Real, (and other built in types I guess). The extended class should have the same properties as Real, but it does not. If changing the Axis to :
type Axis= Real[3];
The check of test is ok.
Note:
See TracTickets
for help on using tickets.
http://intranet/trac/mathmodelica/ticket/2583