mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #1421 from ethereum/test_memory_struct_from_library
test: add a test case about returning a struct in memory from a library
This commit is contained in:
commit
f3662ca498
@ -2817,6 +2817,17 @@ BOOST_AUTO_TEST_CASE(using_for_not_used)
|
|||||||
BOOST_CHECK(expectError(text) == Error::Type::TypeError);
|
BOOST_CHECK(expectError(text) == Error::Type::TypeError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(library_memory_struct)
|
||||||
|
{
|
||||||
|
char const* text = R"(
|
||||||
|
library c {
|
||||||
|
struct S { uint x; }
|
||||||
|
function f() returns (S ) {}
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
BOOST_CHECK(expectError(text) == Error::Type::TypeError);
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(using_for_arbitrary_mismatch)
|
BOOST_AUTO_TEST_CASE(using_for_arbitrary_mismatch)
|
||||||
{
|
{
|
||||||
// Bound to a, but self type does not match.
|
// Bound to a, but self type does not match.
|
||||||
|
Loading…
Reference in New Issue
Block a user