mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
ast: ban signed EXP, fixing #1246
This commit is contained in:
@@ -349,11 +349,14 @@ TypePointer IntegerType::binaryOperatorResult(Token::Value _operator, TypePointe
|
||||
return commonType;
|
||||
if (Token::isBooleanOp(_operator))
|
||||
return TypePointer();
|
||||
// Nothing else can be done with addresses
|
||||
if (auto intType = dynamic_pointer_cast<IntegerType const>(commonType))
|
||||
{
|
||||
// Nothing else can be done with addresses
|
||||
if (intType->isAddress())
|
||||
return TypePointer();
|
||||
// Signed EXP is not allowed
|
||||
if (Token::Exp == _operator && intType->isSigned())
|
||||
return TypePointer();
|
||||
}
|
||||
else if (auto fixType = dynamic_pointer_cast<FixedPointType const>(commonType))
|
||||
if (Token::Exp == _operator)
|
||||
|
||||
Reference in New Issue
Block a user