Skip to content

Commit

Permalink
Merge branch 'parameter_check' into 'master'
Browse files Browse the repository at this point in the history
Enable parameter check

See merge request lfortran/lfortran!1141
  • Loading branch information
certik committed Aug 9, 2021
2 parents 2112248 + 2bde3a4 commit 5af7fe7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lfortran/semantics/ast_symboltable_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,9 +721,8 @@ class SymbolTableVisitor : public AST::BaseVisitor<SymbolTableVisitor> {
if (storage_type == ASR::storage_typeType::Parameter) {
value = ASRUtils::expr_value(init_expr);
if (value == nullptr) {
// TODO: enable this after intrinsic functions (kind) evaluation is implemented:
//throw SemanticError("Value of a parameter variable must evaluate to a compile time constant",
// x.base.base.loc);
throw SemanticError("Value of a parameter variable must evaluate to a compile time constant",
x.base.base.loc);
}
}
}
Expand Down

0 comments on commit 5af7fe7

Please sign in to comment.