Reverse order of inheritance in base list.

This commit is contained in:
Christian 2015-01-26 10:20:46 +01:00
parent 99b31eab89
commit 682a45290c
2 changed files with 3 additions and 3 deletions

View File

@ -1545,7 +1545,7 @@ BOOST_AUTO_TEST_CASE(single_copy_with_multiple_inheritance)
}
contract A is Base { function setViaA(uint i) { setData(i); } }
contract B is Base { function getViaB() returns (uint i) { return getViaBase(); } }
contract Derived is A, B, Base { }
contract Derived is Base, B, A { }
)";
compileAndRun(sourceCode, 0, "Derived");
BOOST_CHECK(callContractFunction("getViaB()") == encodeArgs(0));
@ -1642,7 +1642,7 @@ BOOST_AUTO_TEST_CASE(constructor_argument_overriding)
}
}
contract Base is BaseBase(2) { }
contract Derived is Base, BaseBase(3) {
contract Derived is BaseBase(3), Base {
function getA() returns (uint r) { return m_a; }
}
)";

View File

@ -386,7 +386,7 @@ BOOST_AUTO_TEST_CASE(inheritance_diamond_basic)
contract root { function rootFunction() {} }
contract inter1 is root { function f() {} }
contract inter2 is root { function f() {} }
contract derived is inter1, inter2, root {
contract derived is root, inter2, inter1 {
function g() { f(); rootFunction(); }
}
)";