Merge pull request #6604 from ethereum/library-self-delegatecall

Error on library calling itself externally
This commit is contained in:
chriseth
2019-05-02 17:25:25 +02:00
committed by GitHub
3 changed files with 27 additions and 0 deletions
@@ -0,0 +1,13 @@
library L1 {
using L1 for *;
function f() public pure returns (uint r) { return r.g(); }
function g(uint) public pure returns (uint) { return 2; }
}
library L2 {
using L1 for *;
function f() public pure returns (uint r) { return r.g(); }
function g(uint) public pure returns (uint) { return 2; }
}
// ----
// TypeError: (88-93): Libraries cannot call their own functions externally.