diff --git a/src/analysis/typepal/Collector.rsc b/src/analysis/typepal/Collector.rsc index 06674bc..90b04e7 100644 --- a/src/analysis/typepal/Collector.rsc +++ b/src/analysis/typepal/Collector.rsc @@ -922,7 +922,7 @@ Collector newCollector(str modelName, map[str,Tree] namedTrees, TypePalConfig co } void _addTModel(TModel tm){ - if(!isValidVersion(tm.version)){ + if(!isValidTplVersion(tm.version)){ throw TypePalUsage("TModel for uses TPL version , but is required"); } diff --git a/src/analysis/typepal/Exception.rsc b/src/analysis/typepal/Exception.rsc index 5d0faed..7183aaf 100644 --- a/src/analysis/typepal/Exception.rsc +++ b/src/analysis/typepal/Exception.rsc @@ -12,6 +12,7 @@ data RuntimeException | TypePalInternalError(str reason) // TypePal internal error | TypeUnavailable() // Type is not available: used in control flow of solver | checkFailed(list[FailMessage] msgs) // Type check failed: used in control flow of solver + | wrongTPLVersion(str reason) ; data Exception diff --git a/src/analysis/typepal/Version.rsc b/src/analysis/typepal/Version.rsc index 9143b8b..caa4b4b 100644 --- a/src/analysis/typepal/Version.rsc +++ b/src/analysis/typepal/Version.rsc @@ -2,9 +2,9 @@ module analysis::typepal::Version import util::SemVer; -private str currentTplVersion = "1.1.0"; +private str currentTplVersion = "2.0.0"; -bool isValidVersion(str version){ +bool isValidTplVersion(str version){ return equalVersion(version, currentTplVersion); }