diff --git a/src/analysis/typepal/Collector.rsc b/src/analysis/typepal/Collector.rsc index db8a7e7..872093c 100644 --- a/src/analysis/typepal/Collector.rsc +++ b/src/analysis/typepal/Collector.rsc @@ -956,11 +956,11 @@ Collector newCollector(str modelName, map[str,Tree] namedTrees, TypePalConfig co if(logicalLoc != def.defined){ if(logicalLoc in logical2physical){ if(logical2physical[logicalLoc] != def.defined){ - causes = [ info("Clone of ``", logical2physical[logicalLoc]), - info("Clone of ``", def.defined) + causes = [ info("First declaration of ``", logical2physical[logicalLoc]), + info("Second declaration of ``", def.defined) ]; // restrict clone location to first line for readability - messages += error("Remove code clone for ``", limitLocToFirstLine(def.defined), causes=causes); + messages += error("Duplicate declaration of ``", limitLocToFirstLine(def.defined), causes=causes); } } logical2physical[logicalLoc] = def.defined; diff --git a/src/analysis/typepal/Exception.rsc b/src/analysis/typepal/Exception.rsc index 1b23296..96101dc 100644 --- a/src/analysis/typepal/Exception.rsc +++ b/src/analysis/typepal/Exception.rsc @@ -20,12 +20,12 @@ module analysis::typepal::Exception extend analysis::typepal::FailMessage; data RuntimeException - = TypePalUsage(str reason) // TypePal used incorrectly - | TypePalUsage(str reason, list[loc] details) // TypePal used incorrectly, with additional details - | 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) // Outdated TPL version is used + = TypePalUsage(str msg) // TypePal used incorrectly + | TypePalUsage(str msg, list[loc] details) // TypePal used incorrectly, with additional details + | TypePalInternalError(str msg) // 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 msg) // Outdated TPL version is used ; data Exception