Opened 15 years ago

Last modified 15 years ago

#1155 closed defect (fixed)

Wrong Error: Variable eAxis_ia: trying to override final variable in class

Reported by: adrpo Owned by: adrpo
Priority: critical Milestone:
Component: Version:
Keywords: Cc: adrpo, adrpo

Description

For this model:

model FinalProblem
 function fcall
   input Real[3] inArr;
   output Real[3] outArr;
 algorithm
   outArr := inArr;
 end fcall;
 
 final parameter Real eAxis_ia[3](each final unit="1") = fcall({1,2,3});
end FinalProblem;

we get the wrong error:

trying to override final while merging mod1:  final {unit final = (typed)"1" DAE.PROP(String, C_CONST), E_VALUE: "1"}  with mod2(final):  final = (typed)1.0 DAE.PROP(Real, C_CONST), E_VALUE: 1.0
Error processing file: FinalProblem.mo
[FinalProblem.mo:11:2-11:72:readonly] Error: Variable eAxis_ia: trying to override final variable in class: 

# Error encountered! Exiting...
# Please check the error message and the flags.

Execution failed!

This also happens for:

final parameter Real eAxis_ia[3](each final unit="1") = {1,2,3};

Change History (0)

Note: See TracTickets for help on using tickets.