Reputation: 56
What happens ?
msg.sender.transfer(msg.value);
remix.eth is just telling me
errored: Cannot read property 'op' of undefined
Upvotes: 0
Views: 263
Reputation: 1040
Works fine for me:
pragma solidity ^0.4.0;
contract Test {
function () payable {
msg.sender.transfer(msg.value);
}
}
I get invalid opcode if I don't specify the function is payable.
Upvotes: 1