Removed the default cases related to assertion to detect the problem at compile-time instead of run-time

This commit is contained in:
Anurag Dashputre 2018-08-23 11:47:00 +05:30
parent 435cd95c54
commit 55524788e2

View File

@ -1484,8 +1484,6 @@ TypePointer ReferenceType::unaryOperatorResult(Token::Value _operator) const
return make_shared<TupleType>();
case DataLocation::Storage:
return m_isPointer ? TypePointer() : make_shared<TupleType>();
default:
solAssert(false, "");
}
return TypePointer();
}
@ -1531,8 +1529,6 @@ string ReferenceType::identifierLocationSuffix() const
case DataLocation::CallData:
id += "_calldata";
break;
default:
solAssert(false, "Unknown location returned by location()");
}
if (isPointer())
id += "_ptr";
@ -3182,8 +3178,6 @@ string MagicType::richIdentifier() const
return "t_magic_transaction";
case Kind::ABI:
return "t_magic_abi";
default:
solAssert(false, "Unknown kind of magic");
}
return "";
}