forked from chapel-lang/chapel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dyno: Improve resolution of where-clauses on generic methods (chapel-…
…lang#24645) This PR updates the implementation of instantiating a signature in dyno to correctly set the type of ``this`` while resolving the non-formal elements of a secondary method. Prior to this PR, we were potentially setting the type of ``this`` to be the fully-generic type, rather than the instantiation we had just computed. For example, for a method like ``R.foo()`` we would use ``R`` instead of something like ``R(int)``. While in the area, I also observed and fixed a related issue when referencing fields of a generic type while within an instantiated secondary method. The solution was to simply reset the Resolver's "computed receiver scopes" flag so that they would be appropriately recomputed. This PR also includes a couple of minor cleanups to avoid generating some false "unimplemented" warnings during resolution. [reviewed-by @mppf]
- Loading branch information
Showing
4 changed files
with
48 additions
and
3 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 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