-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
chpl__defaultHash
for borrowed object?
and adjust class tests…
… for set (#15592) Add `chpl__defaultHash` for `borrowed object?` and adjust class tests for set (#15592) This PR adds an overload of `chpl__defaultHash` for `borrowed object?`. The overload of `chpl__defaultHash` for `borrowed object` has been removed, because all non-nilable borrowed objects will coerce to nilable borrowed object. Futures for sets of classes that pass after adding the overload have been migrated to normal tests. Prior to this PR sets of nilable classes (associative domains of nilable classes, in truth) failed to instantiate because they were unable to resolve a call to `chpl__defaultHash`. The compiler can automatically coerce class type arguments with other management styles to `borrowed` when resolving a function call. However, the compiler cannot coerce a nilable class to a non-nilable class, which is why resolution of `chpl__defaultHash` failed when the set element type was `borrowed C?`. --- Testing: - [x] ALL on linux64 when COMM=none - [x] ALL on linux64 when COMM=gasnet --- Reviewed by @mppf.
- Loading branch information
1 parent
f00a357
commit 8260f89
Showing
18 changed files
with
57 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
./SetTest.chpl:3: In function 'testSet': | ||
./SetTest.chpl:4: error: Sets do not support class types | ||
./SetTest.chpl:19: In function 'testSet': | ||
./SetTest.chpl:20: error: Sets do not support this class type | ||
testNilableOwned.chpl:9: Function 'testSet' instantiated as: testSet(type t = owned T?) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
./SetTest.chpl:3: In function 'testSet': | ||
./SetTest.chpl:4: error: Sets do not support class types | ||
./SetTest.chpl:19: In function 'testSet': | ||
./SetTest.chpl:20: error: Sets do not support this class type | ||
testOwned.chpl:9: Function 'testSet' instantiated as: testSet(type t = owned T) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
./SetTest.chpl:3: In function 'testSet': | ||
./SetTest.chpl:4: error: Sets do not support class types | ||
./SetTest.chpl:19: In function 'testSet': | ||
./SetTest.chpl:20: error: Sets do not support this class type | ||
testShared.chpl:9: Function 'testSet' instantiated as: testSet(type t = shared T) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
./SetTest.chpl:3: In function 'testSet': | ||
./SetTest.chpl:4: error: Sets do not support tuple types | ||
./SetTest.chpl:4: error: Sets do not support tuples containing non-nilable classes | ||
testTuple.chpl:9: Function 'testSet' instantiated as: testSet(type t = 2*shared T) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.