Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- contract Base {
- function foo() external returns (uint) {
- return 1234;
- }
- function bar() internal returns (uint) {
- return 1234;
- }
- function baz() public returns (uint) {
- return 1234;
- }
- }
- contract A is Base {
- function test() public returns (uint, uint, uint) {
- // solidity 0.4 allows this
- // uint a = foo();
- // with solidity 0.5 you have to explicitely use 'this.'
- uint a = this.foo(); // external use call
- uint b = bar(); // do not use call
- uint c = baz(); // do not use call
- return (a, b, c);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement