aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/constants/mod_div_rational.sol
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-04-09 21:22:45 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-04-12 03:17:10 +0800
commitdaa69df447e167fe75d57a5bbbabee4d637218a4 (patch)
tree06651c92bf79cbc14a931d28fc161ad480997506 /test/libsolidity/syntaxTests/constants/mod_div_rational.sol
parent418e2725b50aebc169dd80f78a0ce3eefc2e296e (diff)
downloaddexon-solidity-daa69df447e167fe75d57a5bbbabee4d637218a4.tar.gz
dexon-solidity-daa69df447e167fe75d57a5bbbabee4d637218a4.tar.zst
dexon-solidity-daa69df447e167fe75d57a5bbbabee4d637218a4.zip
Error on invalid arithmetic with constant expressions.
Diffstat (limited to 'test/libsolidity/syntaxTests/constants/mod_div_rational.sol')
-rw-r--r--test/libsolidity/syntaxTests/constants/mod_div_rational.sol6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/constants/mod_div_rational.sol b/test/libsolidity/syntaxTests/constants/mod_div_rational.sol
new file mode 100644
index 00000000..f8b6ce31
--- /dev/null
+++ b/test/libsolidity/syntaxTests/constants/mod_div_rational.sol
@@ -0,0 +1,6 @@
+contract C {
+ fixed a1 = 0.1 % -0.4271087646484375;
+ fixed a2 = 0.1 % 0.4271087646484375;
+ fixed a3 = 0 / 0.123;
+ fixed a4 = 0 / -0.123;
+}