Last active
November 15, 2017 10:37
-
-
Save gakonst/71a7830c57a078a36866a6249b868ad8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.4.18; | |
contract C { | |
uint public x; | |
function cannotBeCalled() external { | |
x = 42; | |
} | |
function canBeCalled() { | |
x = 31337; | |
} | |
// does not compile because of this function. | |
// cannotBeCalled is not visible to the contract itself | |
function testExternal() { | |
cannotBeCalled(); | |
} | |
} | |
contract D { | |
function test(address _address) { | |
C(_address).cannotBeCalled(); // this call is not a problem | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment