Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 1f99d4a

Browse files
perostOpenModelica-Hudson
authored andcommitted
[NF] Add case for MUTABLE in Typing.typeExp.
Belonging to [master]: - #2877
1 parent 5e47a15 commit 1f99d4a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Compiler/NFFrontEnd/NFTyping.mo

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,14 @@ algorithm
11051105
case Expression.SUBSCRIPTED_EXP()
11061106
then (exp, exp.ty, Expression.variability(exp));
11071107

1108+
case Expression.MUTABLE()
1109+
algorithm
1110+
e1 := Mutable.access(exp.exp);
1111+
(e1, ty, variability) := typeExp(e1, origin, info);
1112+
exp.exp := Mutable.create(e1);
1113+
then
1114+
(exp, ty, variability);
1115+
11081116
case Expression.PARTIAL_FUNCTION_APPLICATION()
11091117
then Function.typePartialApplication(exp, origin, info);
11101118

0 commit comments

Comments
 (0)