mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow the exponent to be a signed integer literal
This commit is contained in:
@@ -712,6 +712,8 @@ TypeResult IntegerType::binaryOperatorResult(Token _operator, Type const* _other
|
||||
return TypeResult::err("Exponent is fractional.");
|
||||
if (!rationalNumberType->integerType())
|
||||
return TypeResult::err("Exponent too large.");
|
||||
if (rationalNumberType->isNegative())
|
||||
return TypeResult::err("Exponentiation power is not allowed to be a negative integer literal.");
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user