Opened 14 years ago
Last modified 14 years ago
#1286 closed defect (fixed)
Wrong error message from the compiler when trying to cast from real to integer
Reported by: | Adrian Pop | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | high | Milestone: | Red October |
Component: | Instantiation | Version: | 1.6.0 |
Keywords: | Cc: | Adrian Pop, Per Östlund |
Description
Here is the execution trace:
adrpo@kafka ~/dev/OpenModelica/build/bin $ cat > IntegerReal.mo package X constant Integer x = 1.0; end X; model A Integer k = X.x; end A; adrpo@kafka ~/dev/OpenModelica/build/bin $ ./omc.exe IntegerReal.mo Error processing file: IntegerReal.mo Error: Variable X.x not found in scope A # Error encountered! Exiting... # Please check the error message and the flags. Execution failed!
The compiler should not fail with this error message, it should tell you that it cannot covert 1.0 into Integer x\\
Note:
See TracTickets
for help on using tickets.
Fixed in revision 6164, see test case mofiles/ModifierTypeError.