aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/dataLocations/libraries/library_private_function_no_data_location.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/dataLocations/libraries/library_private_function_no_data_location.sol')
-rw-r--r--test/libsolidity/syntaxTests/dataLocations/libraries/library_private_function_no_data_location.sol20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/dataLocations/libraries/library_private_function_no_data_location.sol b/test/libsolidity/syntaxTests/dataLocations/libraries/library_private_function_no_data_location.sol
new file mode 100644
index 00000000..35256eae
--- /dev/null
+++ b/test/libsolidity/syntaxTests/dataLocations/libraries/library_private_function_no_data_location.sol
@@ -0,0 +1,20 @@
+library L {
+ struct S { uint x; }
+ function g() private pure returns (uint[2]) {}
+ function h() private pure returns (uint[]) {}
+ function i() private pure returns (S) {}
+ function j() private pure returns (mapping(uint => uint)) {}
+ function gp(uint[2]) private pure {}
+ function hp(uint[]) private pure {}
+ function ip(S) private pure {}
+ function jp(mapping(uint => uint)) private pure {}
+}
+// ----
+// TypeError: (76-83): Data location must be "storage" or "memory" for return parameter in function, but none was given.
+// TypeError: (127-133): Data location must be "storage" or "memory" for return parameter in function, but none was given.
+// TypeError: (177-178): Data location must be "storage" or "memory" for return parameter in function, but none was given.
+// TypeError: (222-243): Data location must be "storage" or "memory" for return parameter in function, but none was given.
+// TypeError: (264-271): Data location must be "storage" or "memory" for parameter in function, but none was given.
+// TypeError: (305-311): Data location must be "storage" or "memory" for parameter in function, but none was given.
+// TypeError: (345-346): Data location must be "storage" or "memory" for parameter in function, but none was given.
+// TypeError: (380-401): Data location must be "storage" or "memory" for parameter in function, but none was given.