aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/types
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/types')
-rw-r--r--test/libsolidity/syntaxTests/types/mapping/argument_external.sol3
-rw-r--r--test/libsolidity/syntaxTests/types/mapping/argument_public.sol3
-rw-r--r--test/libsolidity/syntaxTests/types/mapping/array_argument_external.sol2
-rw-r--r--test/libsolidity/syntaxTests/types/mapping/array_argument_public.sol2
-rw-r--r--test/libsolidity/syntaxTests/types/mapping/function_type_argument_external.sol1
-rw-r--r--test/libsolidity/syntaxTests/types/mapping/function_type_return_external.sol1
-rw-r--r--test/libsolidity/syntaxTests/types/mapping/mapping_array_return_external.sol2
-rw-r--r--test/libsolidity/syntaxTests/types/mapping/mapping_array_return_public.sol2
-rw-r--r--test/libsolidity/syntaxTests/types/mapping/mapping_data_location_calldata.sol2
-rw-r--r--test/libsolidity/syntaxTests/types/mapping/mapping_data_location_default.sol2
-rw-r--r--test/libsolidity/syntaxTests/types/mapping/mapping_data_location_memory.sol2
-rw-r--r--test/libsolidity/syntaxTests/types/mapping/mapping_return_external.sol3
-rw-r--r--test/libsolidity/syntaxTests/types/mapping/mapping_return_public.sol3
-rw-r--r--test/libsolidity/syntaxTests/types/mapping/mapping_return_public_memory.sol7
14 files changed, 20 insertions, 15 deletions
diff --git a/test/libsolidity/syntaxTests/types/mapping/argument_external.sol b/test/libsolidity/syntaxTests/types/mapping/argument_external.sol
index 0354893f..02beefec 100644
--- a/test/libsolidity/syntaxTests/types/mapping/argument_external.sol
+++ b/test/libsolidity/syntaxTests/types/mapping/argument_external.sol
@@ -3,5 +3,4 @@ contract C {
}
}
// ----
-// TypeError: (28-49): Type is required to live outside storage.
-// TypeError: (28-49): Internal or recursive type is not allowed for public or external functions.
+// TypeError: (28-49): Data location must be "calldata" for parameter in external function, but "storage" was given.
diff --git a/test/libsolidity/syntaxTests/types/mapping/argument_public.sol b/test/libsolidity/syntaxTests/types/mapping/argument_public.sol
index e4121c7f..3939cf26 100644
--- a/test/libsolidity/syntaxTests/types/mapping/argument_public.sol
+++ b/test/libsolidity/syntaxTests/types/mapping/argument_public.sol
@@ -3,5 +3,4 @@ contract C {
}
}
// ----
-// TypeError: (28-49): Type is required to live outside storage.
-// TypeError: (28-49): Internal or recursive type is not allowed for public or external functions.
+// TypeError: (28-49): Data location must be "memory" for parameter in function, but "storage" was given.
diff --git a/test/libsolidity/syntaxTests/types/mapping/array_argument_external.sol b/test/libsolidity/syntaxTests/types/mapping/array_argument_external.sol
index 8dea6907..ef0046d4 100644
--- a/test/libsolidity/syntaxTests/types/mapping/array_argument_external.sol
+++ b/test/libsolidity/syntaxTests/types/mapping/array_argument_external.sol
@@ -3,4 +3,4 @@ contract C {
}
}
// ----
-// TypeError: (28-51): Location has to be calldata for external functions (remove the "memory" or "storage" keyword).
+// TypeError: (28-51): Data location must be "calldata" for parameter in external function, but "storage" was given.
diff --git a/test/libsolidity/syntaxTests/types/mapping/array_argument_public.sol b/test/libsolidity/syntaxTests/types/mapping/array_argument_public.sol
index 69dcec01..fb3f25a4 100644
--- a/test/libsolidity/syntaxTests/types/mapping/array_argument_public.sol
+++ b/test/libsolidity/syntaxTests/types/mapping/array_argument_public.sol
@@ -3,4 +3,4 @@ contract C {
}
}
// ----
-// TypeError: (28-51): Location has to be memory for publicly visible functions (remove the "storage" or "calldata" keyword).
+// TypeError: (28-51): Data location must be "memory" for parameter in function, but "storage" was given.
diff --git a/test/libsolidity/syntaxTests/types/mapping/function_type_argument_external.sol b/test/libsolidity/syntaxTests/types/mapping/function_type_argument_external.sol
index 7fe74fb6..349a4f97 100644
--- a/test/libsolidity/syntaxTests/types/mapping/function_type_argument_external.sol
+++ b/test/libsolidity/syntaxTests/types/mapping/function_type_argument_external.sol
@@ -3,4 +3,5 @@ contract C {
}
}
// ----
+// TypeError: (37-56): Data location must be "memory" for parameter in function, but "storage" was given.
// TypeError: (37-56): Internal type cannot be used for external function type.
diff --git a/test/libsolidity/syntaxTests/types/mapping/function_type_return_external.sol b/test/libsolidity/syntaxTests/types/mapping/function_type_return_external.sol
index f0f8dea6..108d9861 100644
--- a/test/libsolidity/syntaxTests/types/mapping/function_type_return_external.sol
+++ b/test/libsolidity/syntaxTests/types/mapping/function_type_return_external.sol
@@ -3,4 +3,5 @@ contract C {
}
}
// ----
+// TypeError: (57-76): Data location must be "memory" for return parameter in function, but "storage" was given.
// TypeError: (57-76): Internal type cannot be used for external function type.
diff --git a/test/libsolidity/syntaxTests/types/mapping/mapping_array_return_external.sol b/test/libsolidity/syntaxTests/types/mapping/mapping_array_return_external.sol
index dbe030fb..fe021bd0 100644
--- a/test/libsolidity/syntaxTests/types/mapping/mapping_array_return_external.sol
+++ b/test/libsolidity/syntaxTests/types/mapping/mapping_array_return_external.sol
@@ -3,4 +3,4 @@ contract C {
}
}
// ----
-// TypeError: (53-84): Location has to be memory for publicly visible functions (remove the "storage" or "calldata" keyword).
+// TypeError: (53-84): Data location must be "memory" for return parameter in function, but "storage" was given.
diff --git a/test/libsolidity/syntaxTests/types/mapping/mapping_array_return_public.sol b/test/libsolidity/syntaxTests/types/mapping/mapping_array_return_public.sol
index 7dfecf19..1eb9d03b 100644
--- a/test/libsolidity/syntaxTests/types/mapping/mapping_array_return_public.sol
+++ b/test/libsolidity/syntaxTests/types/mapping/mapping_array_return_public.sol
@@ -3,4 +3,4 @@ contract C {
}
}
// ----
-// TypeError: (51-82): Location has to be memory for publicly visible functions (remove the "storage" or "calldata" keyword).
+// TypeError: (51-82): Data location must be "memory" for return parameter in function, but "storage" was given.
diff --git a/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_calldata.sol b/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_calldata.sol
index c73c7f32..deff7c14 100644
--- a/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_calldata.sol
+++ b/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_calldata.sol
@@ -6,4 +6,4 @@ contract c {
}
}
// ----
-// TypeError: (81-113): Data location for mappings must be specified as "storage".
+// TypeError: (81-113): Data location must be "storage" for variable, but "calldata" was given.
diff --git a/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_default.sol b/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_default.sol
index 85531ae1..e5253f00 100644
--- a/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_default.sol
+++ b/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_default.sol
@@ -6,4 +6,4 @@ contract c {
}
}
// ----
-// TypeError: (81-104): Data location for mappings must be specified as "storage".
+// TypeError: (81-104): Data location must be "storage" for variable, but none was given.
diff --git a/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_memory.sol b/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_memory.sol
index 7151e887..600ae669 100644
--- a/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_memory.sol
+++ b/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_memory.sol
@@ -6,4 +6,4 @@ contract c {
}
}
// ----
-// TypeError: (81-111): Data location for mappings must be specified as "storage".
+// TypeError: (81-111): Data location must be "storage" for variable, but "memory" was given.
diff --git a/test/libsolidity/syntaxTests/types/mapping/mapping_return_external.sol b/test/libsolidity/syntaxTests/types/mapping/mapping_return_external.sol
index 85121241..17e646ce 100644
--- a/test/libsolidity/syntaxTests/types/mapping/mapping_return_external.sol
+++ b/test/libsolidity/syntaxTests/types/mapping/mapping_return_external.sol
@@ -3,5 +3,4 @@ contract C {
}
}
// ----
-// TypeError: (53-82): Type is required to live outside storage.
-// TypeError: (53-82): Internal or recursive type is not allowed for public or external functions.
+// TypeError: (53-82): Data location must be "memory" for return parameter in function, but "storage" was given.
diff --git a/test/libsolidity/syntaxTests/types/mapping/mapping_return_public.sol b/test/libsolidity/syntaxTests/types/mapping/mapping_return_public.sol
index 383fa797..cf5ec4ff 100644
--- a/test/libsolidity/syntaxTests/types/mapping/mapping_return_public.sol
+++ b/test/libsolidity/syntaxTests/types/mapping/mapping_return_public.sol
@@ -3,5 +3,4 @@ contract C {
}
}
// ----
-// TypeError: (51-80): Type is required to live outside storage.
-// TypeError: (51-80): Internal or recursive type is not allowed for public or external functions.
+// TypeError: (51-80): Data location must be "memory" for return parameter in function, but "storage" was given.
diff --git a/test/libsolidity/syntaxTests/types/mapping/mapping_return_public_memory.sol b/test/libsolidity/syntaxTests/types/mapping/mapping_return_public_memory.sol
new file mode 100644
index 00000000..35c3abc9
--- /dev/null
+++ b/test/libsolidity/syntaxTests/types/mapping/mapping_return_public_memory.sol
@@ -0,0 +1,7 @@
+contract C {
+ function f() public pure returns (mapping(uint=>uint) memory m) {
+ }
+}
+// ----
+// TypeError: (51-79): Type is required to live outside storage.
+// TypeError: (51-79): Internal or recursive type is not allowed for public or external functions.