diff --git a/test/libsolidity/semanticTests/literalSuffixes/recursive_suffix_application.sol b/test/libsolidity/semanticTests/literalSuffixes/recursive_suffix_application.sol new file mode 100644 index 000000000..3840dce59 --- /dev/null +++ b/test/libsolidity/semanticTests/literalSuffixes/recursive_suffix_application.sol @@ -0,0 +1,16 @@ +function double(uint x) pure suffix returns (uint) { + if (x == 0) + return 0; + if (x == 1) + return 0 double + 2; + else + return 1 double * x; +} + +contract C { + function test() public pure returns (uint) { + return 10 double; + } +} +// ---- +// test() -> 20