I really hope this is not a dumb question.
I am trying to call the constructors of the inherited contracts in a structure like this:
contract A{
uint a;
constructor (uint _a) public {
a = _a;
}
}
contract B is A{
uint b;
constructor (uint _a, uint _b) public{
A(_a);
b = _b;
}
}
contract C is B{
uint c;
constructor(uint _a, uint _b, uint _c) public {
B(_a, _b);
c = _c;
}
}
If I try to compile it in Remix I get the following error:
TypeError: Exactly one argument expected for explicit type conversion B(_a, _b);
Why can't I call the constructor of B with two variables?