-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mapping of redeclared type parameters (#86353)
We were skipping the type parameter mapping of compiler-generated types whose only generic parameters were those implicitly created for the declaring type's type parameters. For the testcase in question, the nested state machine inherited a generic parameter from the display class. This was causing unnecessary warnings in a field assignment that assigned `this` (an instance of the display class) to a field on the state machine. In IL, that assignment references a field type like `DisplayClass<T>` where `T` is the generic parameter on the state machine. Here we were properly mapping type parameters of the display class back to the annotated enclosing method's type parameters, so we could tell that the "target" required `PublicMethods`. But the substituted `T` from the state machine was not mapped, causing the mismatch.
- Loading branch information
Showing
3 changed files
with
19 additions
and
28 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