const.sol 493 B

12345678910111213141516171819202122232425
  1. // RUN: --target substrate --emit cfg
  2. contract c {
  3. // BEGIN-CHECK: c::function::test
  4. function test() public pure returns (int32) {
  5. int32 x = 102;
  6. // CHECK: return int32 102
  7. return x;
  8. }
  9. // BEGIN-CHECK: c::function::add
  10. function add() public pure returns (int32) {
  11. int32 x = 5;
  12. x += 3;
  13. // CHECK: return int32 8
  14. return x;
  15. }
  16. // BEGIN-CHECK: c::function::power
  17. function power() public pure returns (uint32) {
  18. uint32 x = 2;
  19. x = x**4;
  20. // CHECK: return uint32 16
  21. return x;
  22. }
  23. }