mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add tests for mappings in function types.
This commit is contained in:
parent
341128962f
commit
dfcfc4c35b
@ -0,0 +1,6 @@
|
||||
contract C {
|
||||
function f(function(mapping(uint=>uint) storage) external) public pure {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (37-56): Internal type cannot be used for external function type.
|
@ -0,0 +1,4 @@
|
||||
contract C {
|
||||
function f(function(mapping(uint=>uint) storage) internal) internal pure {
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
contract C {
|
||||
function f(function() external returns (mapping(uint=>uint) storage)) public pure {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (57-76): Internal type cannot be used for external function type.
|
@ -0,0 +1,4 @@
|
||||
contract C {
|
||||
function f(function() internal returns (mapping(uint=>uint) storage)) internal pure {
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user