aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/array/length/complex_cyclic_constant.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/array/length/complex_cyclic_constant.sol')
-rw-r--r--test/libsolidity/syntaxTests/array/length/complex_cyclic_constant.sol10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/array/length/complex_cyclic_constant.sol b/test/libsolidity/syntaxTests/array/length/complex_cyclic_constant.sol
new file mode 100644
index 00000000..254f9f02
--- /dev/null
+++ b/test/libsolidity/syntaxTests/array/length/complex_cyclic_constant.sol
@@ -0,0 +1,10 @@
+contract C {
+ uint constant L2 = LEN - 10;
+ uint constant L1 = L2 / 10;
+ uint constant LEN = 10 + L1 * 5;
+ function f() {
+ uint[LEN] a;
+ }
+}
+// ----
+// TypeError: (36-39): Cyclic constant definition (or maximum recursion depth exhausted).