From d87450b9b2ba110b218c8f58224ca3af4e62993b Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 23 Aug 2016 17:03:23 +0200 Subject: Use version string (including prerelease) for pragma matching. --- libsolidity/analysis/SyntaxChecker.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libsolidity/analysis') 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 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; } -- cgit