Skip to content

Commit d126a7f

Browse files
authored
Merge pull request #41 from usethesource/fix/warnings
Fix some type warnings Also fixes usethesource/rascal#2442
2 parents 55bca05 + 77c94cd commit d126a7f

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/analysis/typepal/Collector.rsc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -956,11 +956,11 @@ Collector newCollector(str modelName, map[str,Tree] namedTrees, TypePalConfig co
956956
if(logicalLoc != def.defined){
957957
if(logicalLoc in logical2physical){
958958
if(logical2physical[logicalLoc] != def.defined){
959-
causes = [ info("Clone of `<def.id>`", logical2physical[logicalLoc]),
960-
info("Clone of `<def.id>`", def.defined)
959+
causes = [ info("First declaration of <prettyRole(def.idRole)> `<def.id>`", logical2physical[logicalLoc]),
960+
info("Second declaration of <prettyRole(def.idRole)> `<def.id>`", def.defined)
961961
];
962962
// restrict clone location to first line for readability
963-
messages += error("Remove code clone for <prettyRole(def.idRole)> `<def.id>`", limitLocToFirstLine(def.defined), causes=causes);
963+
messages += error("Duplicate declaration of <prettyRole(def.idRole)> `<def.id>`", limitLocToFirstLine(def.defined), causes=causes);
964964
}
965965
}
966966
logical2physical[logicalLoc] = def.defined;

src/analysis/typepal/Exception.rsc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ module analysis::typepal::Exception
2020
extend analysis::typepal::FailMessage;
2121

2222
data RuntimeException
23-
= TypePalUsage(str reason) // TypePal used incorrectly
24-
| TypePalUsage(str reason, list[loc] details) // TypePal used incorrectly, with additional details
25-
| TypePalInternalError(str reason) // TypePal internal error
26-
| TypeUnavailable() // Type is not available: used in control flow of solver
27-
| checkFailed(list[FailMessage] msgs) // Type check failed: used in control flow of solver
28-
| wrongTplVersion(str reason) // Outdated TPL version is used
23+
= TypePalUsage(str msg) // TypePal used incorrectly
24+
| TypePalUsage(str msg, list[loc] details) // TypePal used incorrectly, with additional details
25+
| TypePalInternalError(str msg) // TypePal internal error
26+
| TypeUnavailable() // Type is not available: used in control flow of solver
27+
| checkFailed(list[FailMessage] msgs) // Type check failed: used in control flow of solver
28+
| wrongTplVersion(str msg) // Outdated TPL version is used
2929
;
3030

3131
data Exception

0 commit comments

Comments
 (0)