solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/236_cyclic_binary_dependency.sol

6 lines
272 B
Solidity

contract A { function f() public { new B(); } }
contract B { function f() public { new C(); } }
contract C { function f() public { new A(); } }
// ----
// TypeError: (131-136): Circular reference for contract creation (cannot create instance of derived or same contract).