diff options
author | chriseth <c@ethdev.com> | 2016-08-23 23:03:23 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-09-01 06:02:51 +0800 |
commit | d87450b9b2ba110b218c8f58224ca3af4e62993b (patch) | |
tree | 55c2e51135b16148b92dfb8868f56be3319c0519 | |
parent | 3c412ed2f63a58b27eeb00fe584b9378311b099f (diff) | |
download | dexon-solidity-d87450b9b2ba110b218c8f58224ca3af4e62993b.tar dexon-solidity-d87450b9b2ba110b218c8f58224ca3af4e62993b.tar.gz dexon-solidity-d87450b9b2ba110b218c8f58224ca3af4e62993b.tar.bz2 dexon-solidity-d87450b9b2ba110b218c8f58224ca3af4e62993b.tar.lz dexon-solidity-d87450b9b2ba110b218c8f58224ca3af4e62993b.tar.xz dexon-solidity-d87450b9b2ba110b218c8f58224ca3af4e62993b.tar.zst dexon-solidity-d87450b9b2ba110b218c8f58224ca3af4e62993b.zip |
Use version string (including prerelease) for pragma matching.
-rw-r--r-- | libsolidity/analysis/SyntaxChecker.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp index d44fceb4..a95b4879 100644 --- a/libsolidity/analysis/SyntaxChecker.cpp +++ b/libsolidity/analysis/SyntaxChecker.cpp @@ -75,12 +75,13 @@ bool SyntaxChecker::visit(PragmaDirective const& _pragma) vector<string> literals(_pragma.literals().begin() + 1, _pragma.literals().end()); SemVerMatchExpressionParser parser(tokens, literals); auto matchExpression = parser.parse(); - SemVerVersion currentVersion{string(VersionNumber)}; + SemVerVersion currentVersion{string(VersionString)}; if (!matchExpression.matches(currentVersion)) syntaxError( _pragma.location(), "Source file requires different compiler version (current compiler is " + - string(VersionNumber) + ")." + string(VersionString) + " - note that nightly builds are considered to be " + "strictly less than the released version" ); m_versionPragmaFound = true; } |