aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-11-06 06:52:45 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-11-06 17:52:10 +0800
commite036133d1be1ac87af29ce145052884c2c025ffa (patch)
tree71a950f55cec1f9355313dcba66c1383cadee948 /test/libsolidity
parent88aee34c22d86a004848ae8bdc818b5168dd94cb (diff)
downloaddexon-solidity-e036133d1be1ac87af29ce145052884c2c025ffa.tar.gz
dexon-solidity-e036133d1be1ac87af29ce145052884c2c025ffa.tar.zst
dexon-solidity-e036133d1be1ac87af29ce145052884c2c025ffa.zip
Fix negative denominator in ``boost::rational`` during exponentiation.
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/syntaxTests/types/rational_negative_numerator_negative_exp.sol5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/types/rational_negative_numerator_negative_exp.sol b/test/libsolidity/syntaxTests/types/rational_negative_numerator_negative_exp.sol
new file mode 100644
index 00000000..b694992c
--- /dev/null
+++ b/test/libsolidity/syntaxTests/types/rational_negative_numerator_negative_exp.sol
@@ -0,0 +1,5 @@
+contract C {
+ function f() public pure returns (int) {
+ return (-1 / 2) ** -1;
+ }
+}