Fix generic type mismatch caused by missing type argument.#62368
Fix generic type mismatch caused by missing type argument.#62368SeifShaheen wants to merge 2 commits intodart-lang:mainfrom
Conversation
… the next contributions Solved this issue and edited the type_analyzer_operations.dart and type_schema_environment.dart on the specified lines in the diff here and ran all testcases to make sure everything is the same + solving the issue.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Thank you for your contribution! This project uses Gerrit for code reviews. Your pull request has automatically been converted into a code review at: https://dart-review.googlesource.com/c/sdk/+/471322 Please wait for a developer to review your code review at the above link; you can speed up the review if you sign into Gerrit and manually add a reviewer that has recently worked on the relevant code. See CONTRIBUTING.md to learn how to upload changes to Gerrit directly. Additional commits pushed to this PR will update both the PR and the corresponding Gerrit CL. After the review is complete on the CL, your reviewer will merge the CL (automatically closing this PR). |
|
https://dart-review.googlesource.com/c/sdk/+/471322 has been updated with the latest commits from this pull request. |
|
https://dart-review.googlesource.com/c/sdk/+/471322 has been updated with the latest commits from this pull request. |
|
@SeifShaheen Thank you for your contribution, unfortunately it is fixing things in the wrong way - an engineer on the front-end team will submit the proper fix instead. Type system and inference rules are rather complex so next time consider choosing a simpler target as your first contribution. |
This pull request introduces enhancements to the type inference and subtyping logic for extension types and Fixes #62242 , adds new targeted test cases for extension type inference and subtyping. The most important changes are grouped below by theme.
Type Inference and Subtyping Improvements
TypeConstraintGeneratorintype_analyzer_operations.dartto handle subtype constraint generation for extension type declarations, ensuring correct erasure and comparison logic.TypeSchemaEnvironmentintype_schema_environment.dartto add a fallback subtype check for extension type variables, allowing legacy/undetermined extension type parameters to be assignable to their non-nullable equivalents when the bound is valid.Extension Type Test Coverage
issue_inference.dartto verify inference and behavior for classes and extensions using extension types as type parameters.test_rep_subtyping.dartto check subtyping relationships between extension types and their representation types.