Browse Source

ExpressionManager: Asserted that when getting a variable with declareOrGetVariable, the returned type is as expected (part 2...).

tempestpy_adaptions
Tim Quatmann 6 years ago
parent
commit
ca9102616b
  1. 2
      src/storm/storage/expressions/ExpressionManager.cpp

2
src/storm/storage/expressions/ExpressionManager.cpp

@ -167,7 +167,7 @@ namespace storm {
STORM_LOG_THROW(!checkName || isValidVariableName(name), storm::exceptions::InvalidArgumentException, "Invalid variable name '" << name << "'.");
auto nameIndexPair = nameToIndexMapping.find(name);
if (nameIndexPair != nameToIndexMapping.end()) {
STORM_LOG_ASSERT(indexToTypeMapping.at(nameIndexPair->second) == variableType, "Tried to declareOrGet variable '" << name << "' of type '" << variableType << "' but there is a variable with that name and different type '" << indexToTypeMapping.at(nameIndexPair->second)"'.");
STORM_LOG_ASSERT(indexToTypeMapping.at(nameIndexPair->second) == variableType, "Tried to declareOrGet variable '" << name << "' of type '" << variableType << "' but there is a variable with that name and different type '" << indexToTypeMapping.at(nameIndexPair->second) << "'.");
return Variable(this->getSharedPointer(), nameIndexPair->second);
} else {
uint_fast64_t offset = 0;

Loading…
Cancel
Save