Allow using calldata keyword to specify data location

This commit is contained in:
mingchuan
2018-05-30 18:05:55 +08:00
parent 9d5064d04d
commit b7cafcbdf9
25 changed files with 155 additions and 25 deletions
@@ -6106,7 +6106,7 @@ BOOST_AUTO_TEST_CASE(warn_unspecified_storage)
}
}
)";
CHECK_ERROR(text, TypeError, "Storage location must be specified as either \"memory\" or \"storage\".");
CHECK_ERROR(text, TypeError, "Data location must be specified as either \"memory\" or \"storage\".");
}
BOOST_AUTO_TEST_CASE(storage_location_non_array_or_struct_disallowed)
@@ -6116,7 +6116,7 @@ BOOST_AUTO_TEST_CASE(storage_location_non_array_or_struct_disallowed)
function f(uint storage a) public { }
}
)";
CHECK_ERROR(text, TypeError, "Storage location can only be given for array or struct types.");
CHECK_ERROR(text, TypeError, "Data location can only be given for array or struct types.");
}
BOOST_AUTO_TEST_CASE(storage_location_non_array_or_struct_disallowed_is_not_fatal)
@@ -6128,7 +6128,7 @@ BOOST_AUTO_TEST_CASE(storage_location_non_array_or_struct_disallowed_is_not_fata
}
}
)";
CHECK_ERROR_ALLOW_MULTI(text, TypeError, (std::vector<std::string>{"Storage location can only be given for array or struct types."}));
CHECK_ERROR_ALLOW_MULTI(text, TypeError, (std::vector<std::string>{"Data location can only be given for array or struct types."}));
}
BOOST_AUTO_TEST_CASE(implicit_conversion_disallowed)