solidity/test/libsolidity/syntaxTests/inheritance/wrong_type_base_arguments.sol

10 lines
322 B
Solidity
Raw Normal View History

contract Base {
2020-06-23 12:14:24 +00:00
constructor(uint8) {}
}
contract Derived is Base(300) { }
contract Derived2 is Base {
2020-06-23 12:14:24 +00:00
constructor() Base(2) { }
}
// ----
2020-06-23 12:14:24 +00:00
// TypeError 9827: (67-70): Invalid type for argument in constructor call. Invalid implicit conversion from int_const 300 to uint8 requested. Literal is too large to fit in uint8.