diff options
Diffstat (limited to 'test/libsolidity/syntaxTests/constants/cyclic_dependency_2.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/constants/cyclic_dependency_2.sol | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/constants/cyclic_dependency_2.sol b/test/libsolidity/syntaxTests/constants/cyclic_dependency_2.sol new file mode 100644 index 00000000..461979f8 --- /dev/null +++ b/test/libsolidity/syntaxTests/constants/cyclic_dependency_2.sol @@ -0,0 +1,10 @@ +contract C { + uint constant a = b * c; + uint constant b = 7; + uint constant c = b + uint(keccak256(d)); + uint constant d = 2 + a; +} +// ---- +// TypeError: The value of the constant a has a cyclic dependency via c. +// TypeError: The value of the constant c has a cyclic dependency via d. +// TypeError: The value of the constant d has a cyclic dependency via a. |