Merge pull request #7773 from ethereum/develop

Merge develop into develop_060
This commit is contained in:
chriseth
2019-11-21 21:49:22 +01:00
committed by GitHub
22 changed files with 313 additions and 18 deletions
@@ -0,0 +1,13 @@
library L {
function f(uint256) external {}
function g(uint256[] storage) external {}
function h(uint256[] memory) public {}
}
contract C {
function f() public pure returns (bytes4 a, bytes4 b, bytes4 c, bytes4 d) {
a = L.f.selector;
b = L.g.selector;
c = L.h.selector;
d = L.h.selector;
}
}
@@ -0,0 +1,10 @@
library L {
function f(uint256) internal {}
}
contract C {
function f() public pure returns (bytes4) {
return L.f.selector;
}
}
// ----
// TypeError: (126-138): Member "selector" not found or not visible after argument-dependent lookup in function (uint256).
@@ -0,0 +1,8 @@
library L {
function f(uint256) private {}
function g(uint256) public returns (uint256) {
return f.selector;
}
}
// ----
// TypeError: (113-123): Member "selector" not found or not visible after argument-dependent lookup in function (uint256).
@@ -0,0 +1,10 @@
library L {
function f(uint256) private {}
}
contract C {
function f() public pure returns (bytes4) {
return L.f.selector;
}
}
// ----
// TypeError: (125-128): Member "f" not found or not visible after argument-dependent lookup in type(library L).
@@ -0,0 +1,10 @@
library L {
function f(uint256) external pure {}
function g(uint256) external view {}
}
contract C {
function f() public pure returns (bytes4, bytes4) {
return (L.f.selector, L.g.selector);
}
}
// ----