mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #7773 from ethereum/develop
Merge develop into develop_060
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
Reference in New Issue
Block a user