mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
New test cases.
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
library L {
|
||||
// Warning for no data location provided can be silenced with storage or memory.
|
||||
function f(uint[] memory, uint[] storage) private pure {}
|
||||
function g(uint[] memory, uint[] storage) internal pure {}
|
||||
function h(uint[] memory) public pure {}
|
||||
// No warning on external functions, because of default to calldata.
|
||||
function i(uint[]) external pure {}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
library L {
|
||||
function g(uint[]) internal pure {}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (27-33): Storage location must be "storage" or "memory" for parameter in internal function, but none was given.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
library L {
|
||||
function h(uint[]) public pure {}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (27-33): Storage location must be "storage" or "memory" for parameter in public function, but none was given.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
library L {
|
||||
function h(uint[]) public pure {}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (27-33): Storage location must be "storage" or "memory" for parameter in public function, but none was given.
|
||||
Reference in New Issue
Block a user