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

10 lines
206 B
Solidity

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