Skip to content

Commit

Permalink
Fix possible use of unassigned variable (#7434)
Browse files Browse the repository at this point in the history
  • Loading branch information
perost committed May 4, 2021
1 parent 81c86f0 commit 0ff0f74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OMCompiler/Compiler/NFFrontEnd/NFTyping.mo
Expand Up @@ -1881,7 +1881,7 @@ algorithm
// Type check the subscript's type against the expected subscript type for the dimension.
ety := Dimension.subscriptType(dimension);
// We can have both : subscripts and : dimensions here, so we need to allow unknowns.
(_, _, mk) := TypeCheck.matchTypes(ty, ety, e, allowUnknown = true);
(_, _, mk) := TypeCheck.matchTypes(ty, ety, Expression.EMPTY(ty), allowUnknown = true);

if TypeCheck.isIncompatibleMatch(mk) then
Error.addSourceMessage(Error.SUBSCRIPT_TYPE_MISMATCH,
Expand Down

0 comments on commit 0ff0f74

Please sign in to comment.