Browse Source

JaniParser: Make warning disappear when assigning an int expression to a real-valued function.

tempestpy_adaptions
Tim Quatmann 4 years ago
parent
commit
c2fc1218b7
  1. 2
      src/storm-parsers/parser/JaniParser.cpp

2
src/storm-parsers/parser/JaniParser.cpp

@ -810,7 +810,7 @@ namespace storm {
storm::expressions::Expression functionBody;
if (!firstPass) {
functionBody = parseExpression(functionDefinitionStructure.at("body"), scope.refine("body of function definition " + functionName), false, parameterNameToVariableMap);
STORM_LOG_WARN_COND(functionBody.getType() == type.expressionType, "Type of body of function " + functionName + "' (scope: " + scope.description + ") has type " << functionBody.getType() << " although the function type is given as " << type.expressionType);
STORM_LOG_WARN_COND(functionBody.getType() == type.expressionType || (functionBody.getType().isIntegerType() && type.expressionType.isRationalType()), "Type of body of function " + functionName + "' (scope: " + scope.description + ") has type " << functionBody.getType() << " although the function type is given as " << type.expressionType);
}
return storm::jani::FunctionDefinition(functionName, type.expressionType, parameters, functionBody);
}

Loading…
Cancel
Save