SHARE
TWEET

Untitled

a guest Jun 15th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. contract Base {
  2.     function foo() external returns (uint) {
  3.         return 1234;
  4.     }
  5.     function bar() internal returns (uint) {
  6.         return 1234;
  7.     }
  8.     function baz() public returns (uint) {
  9.         return 1234;
  10.     }
  11. }
  12.      
  13. contract A is Base {
  14.     function test() public returns (uint, uint, uint) {
  15.         // solidity 0.4 allows this
  16.         // uint a = foo();
  17.         // with solidity 0.5 you have to explicitely use 'this.'
  18.         uint a = this.foo();   // external use call
  19.         uint b = bar();        // do not use call
  20.         uint c = baz();        // do not use call
  21.         return (a, b, c);
  22.     }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top