Don't mark override of abstract base if the override's declaring type is not marked#3098
Merged
jtschuster merged 4 commits intodotnet:mainfrom Nov 2, 2022
Merged
Don't mark override of abstract base if the override's declaring type is not marked#3098jtschuster merged 4 commits intodotnet:mainfrom
jtschuster merged 4 commits intodotnet:mainfrom
Conversation
vitek-karas
approved these changes
Nov 2, 2022
jtschuster
added a commit
to jtschuster/linker
that referenced
this pull request
Nov 2, 2022
… is not marked (dotnet#3098) * Don't mark an override every time the base is abstract, only if the declaring type is also marked Adds a condition to ShouldMarkOverrideForBase to exit early if the declaring type of the method is not marked.
tlakollo
pushed a commit
to dotnet/runtime
that referenced
this pull request
Nov 4, 2022
… is not marked (dotnet/linker#3098) * Don't mark an override every time the base is abstract, only if the declaring type is also marked Adds a condition to ShouldMarkOverrideForBase to exit early if the declaring type of the method is not marked. Commit migrated from dotnet/linker@391ac60
agocke
pushed a commit
to dotnet/runtime
that referenced
this pull request
Nov 16, 2022
… is not marked (dotnet/linker#3098) * Don't mark an override every time the base is abstract, only if the declaring type is also marked Adds a condition to ShouldMarkOverrideForBase to exit early if the declaring type of the method is not marked. Commit migrated from dotnet/linker@391ac60
sbomer
added a commit
that referenced
this pull request
Jan 18, 2023
…state changes (#3094) * Check for marking virtual method due to base only when state changes (#3073) Instead of checking every virtual method to see if it should be kept due to a base method every iteration of the MarkStep pipeline, check each method only when its relevant state has changed. Co-authored-by: Sven Boemer <sbomer@gmail.com> * Don't mark override of abstract base if the override's declaring type is not marked (#3098) * Don't mark an override every time the base is abstract, only if the declaring type is also marked Adds a condition to ShouldMarkOverrideForBase to exit early if the declaring type of the method is not marked. * Add test case for #3112 with pseudo-circular reference with ifaces * Link issue to TODO * Adds a test for recursive generics on interfaces This is a copy of the test added in #3156 Co-authored-by: Sven Boemer <sbomer@gmail.com> Co-authored-by: vitek-karas <10670590+vitek-karas@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a check to ensure the declaring type is marked in
ShouldMarkOverrideForBase.Adds a test to check for this behavior.
Should fix the issues in linker flow to sdk at dotnet/sdk#28796.
Before the change, in OverrideInUnmarkedClassIsRemoved we would mark
UnmarkedDerived.MethodandUnmarkedDerivedbecauseMarkedBase.Methodwas marked andabstract.