我正在尝试编译我的可靠智能契约,但我一直收到这样的错误:Doc tag @notice not valid for statements。
我的代码中没有@notice语句。这个错误似乎发生在稳定版本从0.4到0.4.9之间,不管有没有优化。
编辑:通过“分而治之”,我可以将错误归因于以下函数:
function f(uint blockNumber, bool finalBlock) returns (bool) {
if (msg.sender != protocolParameters.A)
return false; // caller is not Alice
if (blockNumber > protocolValues.blockNumber && blockNumber <= protocolParameters.numberOfBlocks*2) {
protocolValues.stageNumber = blockNumber*2;
} else {
throw; // TODO: is throw angemessen here?
}
/// TODO: careful
if (finalBlock) {
protocolValues.phaseNumber = 2; // we go to the TERMINAL phase
setPayoffs(protocolParameters.DA, protocolParameters.DB + protocolParameters.FV);
}
return true;
}有什么想法吗?
发布于 2017-04-20 14:48:46
问题如下:
/// TODO: careful 显然,///是由稳健编译器特别处理,并导致错误。
移除它解决了问题。
与/** my comment */一起添加的注释也会导致错误。注意注释开头的双星号。
https://ethereum.stackexchange.com/questions/15357
复制相似问题