mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Removed the default cases related to assertion to detect the problem at compile-time instead of run-time
This commit is contained in:
parent
435cd95c54
commit
55524788e2
@ -1484,8 +1484,6 @@ TypePointer ReferenceType::unaryOperatorResult(Token::Value _operator) const
|
|||||||
return make_shared<TupleType>();
|
return make_shared<TupleType>();
|
||||||
case DataLocation::Storage:
|
case DataLocation::Storage:
|
||||||
return m_isPointer ? TypePointer() : make_shared<TupleType>();
|
return m_isPointer ? TypePointer() : make_shared<TupleType>();
|
||||||
default:
|
|
||||||
solAssert(false, "");
|
|
||||||
}
|
}
|
||||||
return TypePointer();
|
return TypePointer();
|
||||||
}
|
}
|
||||||
@ -1531,8 +1529,6 @@ string ReferenceType::identifierLocationSuffix() const
|
|||||||
case DataLocation::CallData:
|
case DataLocation::CallData:
|
||||||
id += "_calldata";
|
id += "_calldata";
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
solAssert(false, "Unknown location returned by location()");
|
|
||||||
}
|
}
|
||||||
if (isPointer())
|
if (isPointer())
|
||||||
id += "_ptr";
|
id += "_ptr";
|
||||||
@ -3182,8 +3178,6 @@ string MagicType::richIdentifier() const
|
|||||||
return "t_magic_transaction";
|
return "t_magic_transaction";
|
||||||
case Kind::ABI:
|
case Kind::ABI:
|
||||||
return "t_magic_abi";
|
return "t_magic_abi";
|
||||||
default:
|
|
||||||
solAssert(false, "Unknown kind of magic");
|
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user