Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/analysis/typepal/Collector.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<def.id>`", logical2physical[logicalLoc]),
info("Clone of `<def.id>`", def.defined)
causes = [ info("First declaration of <prettyRole(def.idRole)> `<def.id>`", logical2physical[logicalLoc]),
info("Second declaration of <prettyRole(def.idRole)> `<def.id>`", def.defined)
];
// restrict clone location to first line for readability
messages += error("Remove code clone for <prettyRole(def.idRole)> `<def.id>`", limitLocToFirstLine(def.defined), causes=causes);
messages += error("Duplicate declaration of <prettyRole(def.idRole)> `<def.id>`", limitLocToFirstLine(def.defined), causes=causes);
}
}
logical2physical[logicalLoc] = def.defined;
Expand Down
12 changes: 6 additions & 6 deletions src/analysis/typepal/Exception.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading