Skip to content

Commit 9c0dd49

Browse files
committed
Constant checking of array constructor expressions containing iterators fixed.
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1159 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 2097c58 commit 9c0dd49

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

modeq/mod.rml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,9 +943,9 @@ relation print_eqmod : Types.EqMod option => () =
943943
axiom print_eqmod NONE
944944

945945
rule Print.print_buf " =(typed) " & Exp.print_exp e &
946-
Dump.print_select (const, "const", "non-const")
946+
Types.print_prop prop
947947
-----------------------------
948-
print_eqmod SOME(Types.TYPED(e,Types.PROP(ty,const)))
948+
print_eqmod SOME(Types.TYPED(e,prop))
949949

950950
rule Print.print_buf " =(untyped) " & Dump.print_exp e
951951
-----------------------------

modeq/staticexp.rml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ relation add_for_loop_scope_const : (Env.Env, Ident, Types.Type) => Env.Env =
363363
Types.VAR(i,
364364
Types.ATTR(false,
365365
SCode.RW,
366-
SCode.VAR,
366+
SCode.PARAM,
367367
Absyn.BIDIR),
368368
false,
369369
typ,

modeq/types.rml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ returns multiple arguments. *)
144144
relation make_array: (Type, Absyn.ArrayDim) => Type
145145
relation array_element_type : Type => Type
146146
relation print_type : Type => ()
147+
relation print_prop : Properties => ()
147148
relation unparse_type : Type => string
148149
relation print_var : Var => ()
149150
relation print_binding : Binding => ()
@@ -1566,3 +1567,20 @@ relation match_with_promote : (Properties, Properties, bool (* Allow Integer =>
15661567
match_with_promote(PROP((T_INTEGER(_),_),c1),PROP((T_INTEGER(_),p2),c2), true)
15671568
=> PROP((T_REAL([]),p2),c)
15681569
end
1570+
1571+
relation print_prop : Properties => () =
1572+
1573+
rule Print.print_buf "PROP(" &
1574+
print_type ty &
1575+
Dump.print_select(const,"const","non_const") &
1576+
Print.print_buf ")"
1577+
-------------------
1578+
print_prop PROP(ty,const)
1579+
1580+
rule Print.print_buf "PROP_TUPLE(" &
1581+
print_type ty &
1582+
Print.print_buf ",<Type.Const>)"
1583+
---------------------------------
1584+
print_prop PROP_TUPLE(ty,const)
1585+
1586+
end

0 commit comments

Comments
 (0)