-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Covariant Returns Feature #35308
Covariant Returns Feature #35308
Commits on Apr 22, 2020
-
Covariant Returns Feature: Allowing return types on MethodImpl to be …
…derived types of the return type on the MethodDecl. Feature limitations: - Only supports MethodImpls and MethodDecls on classes (no interfaces/valuetypes). - MethodImpl and MethodDecl cannot be on the same type. - Interface/valuetypes not supported as covariant return types. Changes are mostly a boolean flag being passed around to allow for covariant type checking in method signatures. Generics are handled by correctly keeping track of the substitution chain while traversing the base type hierarchy for type comparison. All method signature comparisons uses metadata for checking, without loading any type (with some exceptions). Validation for the `ValidateMethodImplRemainsInEffectAttribute` is performed at the very last step of `CLASS_LOAD_EXACTPARENTS`. Inludes unit tests to cover positive/negative scenarios: - Non-generics - Generics, with various levels of complexities on generic instantiations and substitutions - GVMs - Delegates - Tests for validation of the existance/absence of the ValidateMethodImplRemainsInEffectAttribute - Interface and valuetype scenarios (negative scenarios)
Fadi Hanna committedApr 22, 2020 Configuration menu - View commit details
-
Copy full SHA for bf7501f - Browse repository at this point
Copy the full SHA bf7501fView commit details -
Adding the missing .ctor methods to the various types
Fadi Hanna committedApr 22, 2020 Configuration menu - View commit details
-
Copy full SHA for fef49b2 - Browse repository at this point
Copy the full SHA fef49b2View commit details -
Perform covariant return signature matching only after an exact match…
… fails Fix a couple of issues in IL tests
Fadi Hanna committedApr 22, 2020 Configuration menu - View commit details
-
Copy full SHA for f10119d - Browse repository at this point
Copy the full SHA f10119dView commit details
Commits on Apr 23, 2020
-
Add test coverage for implicit override with less derived return type
Fadi Hanna committedApr 23, 2020 Configuration menu - View commit details
-
Copy full SHA for 8d5d87e - Browse repository at this point
Copy the full SHA 8d5d87eView commit details -
Change ValidateMethodImplRemainsInEffect attribute to apply to methods
Fadi Hanna committedApr 23, 2020 Configuration menu - View commit details
-
Copy full SHA for a14af6f - Browse repository at this point
Copy the full SHA a14af6fView commit details
Commits on Apr 29, 2020
-
Moving covariant return type checking to the final stage of type load…
…ing, and use CanCastTo instead of signature-based checking, to be allow for type compatibility based on ECMA I.8.7.1. Fixed behavior of the ValidateMethodImplRemainsInEffectAttribute. Updates to tests
Fadi Hanna committedApr 29, 2020 Configuration menu - View commit details
-
Copy full SHA for 0e4e472 - Browse repository at this point
Copy the full SHA 0e4e472View commit details -
Rename attribute and reference it from System.Runtime instead of S.P.C
Fadi Hanna committedApr 29, 2020 Configuration menu - View commit details
-
Copy full SHA for 698eafb - Browse repository at this point
Copy the full SHA 698eafbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6848c40 - Browse repository at this point
Copy the full SHA 6848c40View commit details
Commits on Apr 30, 2020
-
Handling for struct cases, and adding test coverage for it.
Fadi Hanna committedApr 30, 2020 Configuration menu - View commit details
-
Copy full SHA for 5a85da8 - Browse repository at this point
Copy the full SHA 5a85da8View commit details -
Fadi Hanna committed
Apr 30, 2020 Configuration menu - View commit details
-
Copy full SHA for 89bb5c3 - Browse repository at this point
Copy the full SHA 89bb5c3View commit details -
Fix consistency issue with the way the RequireMethodImplToRemainInEff…
…ectAttribute is declared
Fadi Hanna committedApr 30, 2020 Configuration menu - View commit details
-
Copy full SHA for cbecf78 - Browse repository at this point
Copy the full SHA cbecf78View commit details
Commits on May 4, 2020
-
Support covariant returns and slot unifications in crossgen2
These changes fix the behavior of the devirtualization algorithm to not incorrectly devirtualize covariant return methods that have the slot unification attribute
Fadi Hanna committedMay 4, 2020 Configuration menu - View commit details
-
Copy full SHA for 1154b90 - Browse repository at this point
Copy the full SHA 1154b90View commit details
Commits on May 5, 2020
-
Fadi Hanna committed
May 5, 2020 Configuration menu - View commit details
-
Copy full SHA for f97b9de - Browse repository at this point
Copy the full SHA f97b9deView commit details
Commits on May 7, 2020
-
Add unit test coverage for delegates
Fadi Hanna committedMay 7, 2020 Configuration menu - View commit details
-
Copy full SHA for 1329fea - Browse repository at this point
Copy the full SHA 1329feaView commit details
Commits on May 14, 2020
-
Fix handling of covariant and contravariant generic interfaces
Also add tests for those.
Configuration menu - View commit details
-
Copy full SHA for 997074f - Browse repository at this point
Copy the full SHA 997074fView commit details
Commits on May 18, 2020
-
Added test cases to interfaces unit test
Based on PR feedback, I've added test cases to verify the load level asserts change.
Configuration menu - View commit details
-
Copy full SHA for ed9fb4c - Browse repository at this point
Copy the full SHA ed9fb4cView commit details
Commits on May 20, 2020
-
Fix Nullable handling and add more tests
The attempt to overload method with int32 return value by a method with Nullable<int32> was asserting in CanCastTo. This change fixes it by pre-checking this case before calling into CanCastTo. I've also slightly refactored the ValidateMethodsWithCovariantReturnTypes by extracting the compatible-with stuff into IsCompatibleWith method. Added tests to test various compatible-with differences from the originally used CanCastTo
Configuration menu - View commit details
-
Copy full SHA for 6eaaa1a - Browse repository at this point
Copy the full SHA 6eaaa1aView commit details
Commits on May 22, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 688c263 - Browse repository at this point
Copy the full SHA 688c263View commit details
Commits on May 26, 2020
-
- Change the CompatibleWithTest to call virtual methods on test classes instead of just instantiating the classes. - Update crossgen2 similar to the runtime to have IsCompatibleWith method doing the same pre-filtering before calling CanCastTo.
Configuration menu - View commit details
-
Copy full SHA for 3636d03 - Browse repository at this point
Copy the full SHA 3636d03View commit details
Commits on Jun 1, 2020
-
Configuration menu - View commit details
-
Copy full SHA for c05f075 - Browse repository at this point
Copy the full SHA c05f075View commit details -
Disable covariant returns tests on Mono for now
The mono doesn't implement the feature yet
Configuration menu - View commit details
-
Copy full SHA for 7ccd3ed - Browse repository at this point
Copy the full SHA 7ccd3edView commit details