【发布时间】:2020-01-10 15:09:46
【问题描述】:
这是源代码
pragma solidity ^0.5.1;
contract myContract{
string value;
constructor() public {
value = "myValue";
}
function get() public view returns(string memory){
return value;
}
function set(string memory _value) public{
value = _value;
}
}
在 Remix IDE 上选择的编译器是 0.5.1+commit.c8a2cb62
选择的环境是Javascript VM
当我编译命令时,我得到了这个错误
Internal exception in StandardCompiler::compileInternal: /root/project/libevmasm/ExpressionClasses.cpp(187): Throw in function ExpressionClasses::Id dev::eth::ExpressionClasses::tryToSimplify(const dev::eth::ExpressionClasses::Expression &)
Dynamic exception type: boost::exception_detail::clone_impl<dev::eth::OptimizerException>
std::exception::what: Rule list not properly initialized.
[dev::tag_comment*] = Rule list not properly initial
但是,如果我将编译器选择为0.5.11,则不会针对相同的源代码弹出此错误
其他用户说他们在 pre0.5.3 编译器上遇到此错误。
【问题讨论】:
-
我可以使用 Remix 用 0.5.1 编译并且没有报错。