aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-08-23 23:03:23 +0800
committerchriseth <c@ethdev.com>2016-09-01 06:02:51 +0800
commitd87450b9b2ba110b218c8f58224ca3af4e62993b (patch)
tree55c2e51135b16148b92dfb8868f56be3319c0519 /libsolidity
parent3c412ed2f63a58b27eeb00fe584b9378311b099f (diff)
downloaddexon-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.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/analysis/SyntaxChecker.cpp5
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;
}