Skip to content

Commit

Permalink
Fix handling of fill
Browse files Browse the repository at this point in the history
- Forgot that functions are more than algorithms.
  • Loading branch information
perost committed Dec 19, 2020
1 parent 2e7db4f commit a3e19c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OMCompiler/Compiler/NFFrontEnd/NFBuiltinCall.mo
Expand Up @@ -1035,7 +1035,7 @@ protected
for arg in dimensionArgs loop
(arg, arg_ty, arg_var, arg_pur) := Typing.typeExp(arg, context, info);

if not InstContext.inAlgorithm(context) then
if not (InstContext.inAlgorithm(context) or InstContext.inFunction(context)) then
if arg_var > Variability.PARAMETER or arg_pur == Purity.IMPURE or
Structural.isExpressionNotFixed(arg) then
Error.addSourceMessageAndFail(Error.NON_PARAMETER_EXPRESSION_DIMENSION,
Expand Down

0 comments on commit a3e19c6

Please sign in to comment.