diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-08-01 18:52:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-01 18:52:57 +0800 |
commit | ef269bf40d3c6fc044c27654473353c556402b77 (patch) | |
tree | 4d0162665f6f185e368e0831359d336e8251e438 /test/libsolidity/SolidityEndToEndTest.cpp | |
parent | 21888e246b771325ea55da39d7f335638da1a98e (diff) | |
parent | b800bfb02138f843538bca55a40d6a4e0d1be60f (diff) | |
download | dexon-solidity-ef269bf40d3c6fc044c27654473353c556402b77.tar dexon-solidity-ef269bf40d3c6fc044c27654473353c556402b77.tar.gz dexon-solidity-ef269bf40d3c6fc044c27654473353c556402b77.tar.bz2 dexon-solidity-ef269bf40d3c6fc044c27654473353c556402b77.tar.lz dexon-solidity-ef269bf40d3c6fc044c27654473353c556402b77.tar.xz dexon-solidity-ef269bf40d3c6fc044c27654473353c556402b77.tar.zst dexon-solidity-ef269bf40d3c6fc044c27654473353c556402b77.zip |
Merge pull request #4321 from ethereum/contractConversion
[BREAKING] Disallow conversion between unrelated contract types.
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 223250fa..e9e7c93b 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -9420,7 +9420,7 @@ BOOST_AUTO_TEST_CASE(failed_create) contract C { uint public x; constructor() public payable {} - function f(uint amount) public returns (address) { + function f(uint amount) public returns (D) { x++; return (new D).value(amount)(); } @@ -9428,7 +9428,7 @@ BOOST_AUTO_TEST_CASE(failed_create) if (depth < 1024) return this.stack(depth - 1); else - return f(0); + return address(f(0)); } } )"; @@ -12524,10 +12524,10 @@ BOOST_AUTO_TEST_CASE(staticcall_for_view_and_pure) return (new C()).f(); } function fview() public returns (uint) { - return (CView(new C())).f(); + return (CView(address(new C()))).f(); } function fpure() public returns (uint) { - return (CPure(new C())).f(); + return (CPure(address(new C()))).f(); } } )"; |