mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Updates Changelog, syntax test and simplifies type checker.
This commit is contained in:
parent
038554abe0
commit
34a031609e
@ -558,10 +558,8 @@ void TypeChecker::endVisit(InheritanceSpecifier const& _inheritance)
|
|||||||
toString(parameterTypes.size()) +
|
toString(parameterTypes.size()) +
|
||||||
"."
|
"."
|
||||||
);
|
);
|
||||||
if (arguments->size() != 0)
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
for (size_t i = 0; i < arguments->size(); ++i)
|
for (size_t i = 0; i < std::min(arguments->size(), parameterTypes.size()); ++i)
|
||||||
if (!type(*(*arguments)[i])->isImplicitlyConvertibleTo(*parameterTypes[i]))
|
if (!type(*(*arguments)[i])->isImplicitlyConvertibleTo(*parameterTypes[i]))
|
||||||
m_errorReporter.typeError(
|
m_errorReporter.typeError(
|
||||||
(*arguments)[i]->location(),
|
(*arguments)[i]->location(),
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
contract Base {
|
contract Base {
|
||||||
constructor(uint) public {}
|
constructor(uint) public {}
|
||||||
}
|
}
|
||||||
contract Base2 {
|
|
||||||
constructor(uint, uint) public {}
|
|
||||||
}
|
|
||||||
contract Derived is Base(2) { }
|
contract Derived is Base(2) { }
|
||||||
contract Derived2 is Base(), Derived() { }
|
contract Derived2 is Base(), Derived() { }
|
||||||
contract Derived3 is Base2(2,2) { }
|
|
||||||
contract Derived4 is Base2(2), Derived() { }
|
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (156-162): Wrong argument count for constructor call: 0 arguments given but expected 1.
|
// TypeError: (101-107): Wrong argument count for constructor call: 0 arguments given but expected 1.
|
||||||
// TypeError: (235-243): Wrong argument count for constructor call: 1 arguments given but expected 2.
|
|
||||||
|
Loading…
Reference in New Issue
Block a user