0

Using the Remix IDE, I'd like to try out some of the new features of Solidity by using the nightly compiler build, but it's giving me a wrong compiler error.

When I try

pragma solidity 0.6.0;

//...

while using version 0.6.0-nightly.2019.3.11+commit.4704ef84.Emscripten.clang

I get the error: ParserError: Source file requires different compiler version (current compiler is 0.6.0-nightly.2019.3.11+commit.4704ef84.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version

trying pragma solidity ^0.5.7; works but then I cant try the new features.

  • Does pragma solidity >0.5.8 <0.6.0; work? (Though I notice there's not actually a 0.5.8 release yet... ) – Richard Horrocks Apr 28 at 20:54
  • That seems to work, thanks! – Jonah Apr 28 at 23:52
1

(Just to ensure the answer in the comments doesn't go missing at some point.)

You should be able to do this using:

pragma solidity >0.5.8 <0.6.0;

The error is basically saying that a nightly 0.6.0-nightly.xxx... isn't actually 0.6.0 proper (i.e. 0.6.0 doesn't actually exist yet). So you want to force the use of something lower than 0.6.0, but higher than the previous major version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.