-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix object subtype-relation between generic instances (#847)
## Summary Fix a bug with the subtype-of-generic-object logic that caused generic instances of object-like types to be treated as unrelated when one of their in-between types is a `ref`/`ptr` type while the formal type is not (or vice versa). Refer to the added test for an example of where this issue surfaced. ## Details The mistake was considering the skipped ptr/ref at each inheritance step, while it must only be considered once for the formal and original actual type. This properly considers `ref` and `ptr` types being used as object base types. In addition to the fix, the documentation of and inside `isSubtypeOfGenericInstance` is slightly improved.
- Loading branch information
Showing
2 changed files
with
33 additions
and
7 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