solidity/test/libsolidity/syntaxTests/types/contract_to_unrelated_contract.sol

10 lines
201 B
Solidity
Raw Normal View History

contract A {}
contract B {}
contract C {
function f() public pure {
B b = B(new A());
}
}
// ----
// TypeError: (80-90): Explicit type conversion not allowed from "contract A" to "contract B".