0

怎么了 ?

    msg.sender.transfer(msg.value);

remix.eth 只是告诉我

错误:无法读取未定义的属性“操作”

4

1 回答 1

1

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.

于 2017-09-29T19:37:11.250 回答