I want to create another contract in a contract function call and pass the associated ether into that new contract. Seems like it makes sense to want to do but...
Why doesn't this work?
contract B {
uint x;
function B(uint a) payable {
x = a;
}
}
contract A {
function createAndPassAmount(uint arg, uint amount) payable {
B newD = new B.value(amount)(arg);
}
}