New test cases.

This commit is contained in:
mingchuan
2018-08-14 18:53:06 +02:00
committed by chriseth
parent b000a022f2
commit 16de7a0493
20 changed files with 126 additions and 0 deletions
@@ -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 {}
}
@@ -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.
@@ -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.
@@ -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.