Opened 13 years ago
Closed 13 years ago
#2092 closed defect (fixed)
Got type mismatch error, but matching types Integer
| Reported by: | Bill Janssen | Owned by: | Adrian Pop | 
|---|---|---|---|
| Priority: | high | Milestone: | 1.9.0 | 
| Component: | Frontend | Version: | trunk | 
| Keywords: | Cc: | 
Description (last modified by )
% omc +showErrorMessages +d=pedantic /tmp/t2.mo ModelicaServices Modelica
{"Warning: Parameter nu has neither value nor start value, and is fixed during initialization (fixed=true)", "TRANSLATION", "Warning", "500"}
{"[/private/tmp/t2.mo:3:3-3:25:writable] Error: Got type mismatch error, but matching types Integer.
This is a ***COMPILER BUG***, please report it to https://trac.openmodelica.org/OpenModelica.", "TRANSLATION", "Error", "247"}
{"Error: Error occurred while flattening model t2", "TRANSLATION", "Error", "89"}
Error processing file: /tmp/t2.mo
Warning: Parameter nu has neither value nor start value, and is fixed during initialization (fixed=true)
[/private/tmp/t2.mo:3:3-3:25:writable] Error: Got type mismatch error, but matching types Integer.
This is a ***COMPILER BUG***, please report it to https://trac.openmodelica.org/OpenModelica.
Error: Error occurred while flattening model t2
# Error encountered! Exiting...
# Please check the error message and the flags.
Execution failed!
%
      Change History (4)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
| Component: | Backend → Frontend | 
|---|---|
| Description: | modified (diff) | 
| Owner: | changed from to | 
comment:3 by , 13 years ago
| Owner: | changed from to | 
|---|---|
| Status: | new → assigned | 
OK; the error-message should be "Could not evaluate structural parameter nu". But it's just a warning since the front-end ceval is not sure if it needs the value or not...
comment:4 by , 13 years ago
| Resolution: | → fixed | 
|---|---|
| Status: | assigned → closed | 
I think Adrian fixed this...
[a.mo:3:3-3:25:writable] Error: Could not evaluate structural parameter (or constant): nu which gives dimensions of array: vals[nu]. Array dimensions must be known at compile time.
  Note:
 See   TracTickets
 for help on using tickets.
    
Whoops! An old version of the model. It should be
model t2 parameter Integer nu; input Integer[nu] vals; Integer y; equation y = max({abs(vals[i]) for i in 1:nu}); end t2;