Remove ClassSupportsIClassX which always returns true - #131683
Conversation
Co-authored-by: elinor-fung <47805090+elinor-fung@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @dotnet/interop-contrib |
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
@copilot can we remove enum_SupportsIClassX and adjust the code paths that check it to take the "is set" branch if it's set unconditionally? |
Co-authored-by: jkoritzinsky <1571408+jkoritzinsky@users.noreply.github.com>
Done in commit that follows on this PR. Removed
Note This response was generated by GitHub Copilot. |
Co-authored-by: elinor-fung <47805090+elinor-fung@users.noreply.github.com>
Co-authored-by: AaronRobinsonMSFT <30635565+AaronRobinsonMSFT@users.noreply.github.com>
There was a problem hiding this comment.
Copilot's findings
Suppressed comments (1)
src/coreclr/vm/comcallablewrapper.cpp:3608
- GetClassComMT() can only create a class COM method table (CreateComMethodTableForClass has a !IsInterface() precondition). With SupportsIClassX removed, it would be good to keep an explicit contract precondition here to catch accidental calls on interface templates closer to the source.
CONTRACTL
{
THROWS;
GC_TRIGGERS;
MODE_ANY;
}
- Files reviewed: 6/6 changed files
- Comments generated: 0 new
|
@jkoritzinsky Can you please review this. My signoff is likely invalid now. |
ClassSupportsIClassXwas a stub that unconditionally returnedTRUE, making all call sites either dead code or no-ops. Removes the function and simplifies the call sites. This also meanenum_SupportsIClassXwas always set for classes - removed it and SupportsIClassX().