solidity/test/libsolidity/syntaxTests/constructor/inconstructible_internal_constructor_old.sol
2018-04-18 14:24:35 +02:00

10 lines
339 B
Solidity

contract C {
function C() internal {}
}
contract D {
function f() public { C x = new C(); x; }
}
// ----
// Warning: (14-38): Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
// TypeError: (83-88): Contract with internal constructor cannot be created directly.