Skip to content

Commit

Permalink
don't show show a deprecation message if the user has key and some ot…
Browse files Browse the repository at this point in the history
…her comparator special method

Signed-off-by: Jade Abraham <[email protected]>
  • Loading branch information
jabraham17 committed Sep 3, 2024
1 parent 23295bd commit 1e80f13
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions test/library/standard/Sort/errors/errors-comparator.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ proc keyPartArgs.keyPart(a) {
return a;
}

// this should still get a deprecation warning
// Both key and compare
record keyAndCompare { }
proc keyAndCompare.key(a) {
Expand All @@ -61,7 +60,6 @@ proc keyAndCompare.compare(a, b) {
return 0;
}

// this should still get a deprecation warning
// Both key and keyPart
record keyAndKeyPart { }
proc keyAndKeyPart.key(a) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
errors-comparator.chpl:9: In function 'main':
errors-comparator.chpl:17: warning: Defining a comparator with a 'key' method without implementing the keyComparator interface is deprecated. Please implement the keyComparator interface (i.e. 'record keyAndCompare: keyComparator').
errors-comparator.chpl:17: error: keyAndCompare contains both a key method and a compare method
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
errors-comparator.chpl:9: In function 'main':
errors-comparator.chpl:17: warning: Defining a comparator with a 'key' method without implementing the keyComparator interface is deprecated. Please implement the keyComparator interface (i.e. 'record keyAndKeyPart: keyComparator').
errors-comparator.chpl:17: error: keyAndKeyPart contains both a key method and a keyPart method

0 comments on commit 1e80f13

Please sign in to comment.