solidity/test/libsolidity/syntaxTests/constructor/inconstructible_internal_constructor.sol
2022-04-01 23:41:18 -05:00

9 lines
303 B
Solidity

contract C {
constructor() internal {}
}
contract D {
function f() public { C c = new C(); c; }
}
// ----
// DeclarationError 1845: (14-39='constructor() internal {}'): Non-abstract contracts cannot have internal constructors. Remove the "internal" keyword and make the contract abstract to fix this.