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

10 lines
211 B
Solidity
Raw Normal View History

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