Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Enable negative type-check results in CoreLib version bubble #23549

Merged
merged 1 commit into from
Apr 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/vm/jitinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4629,8 +4629,10 @@ TypeCompareState CEEInfo::compareTypesForCast(
// In R2R it is a breaking change for a previously positive
// cast to become negative, but not for a previously negative
// cast to become positive. So in R2R a negative result is
// always reported back as May.
if (IsReadyToRunCompilation() && (result == TypeCompareState::MustNot))
// always reported back as May, except for CoreLib version bubble.
if (IsReadyToRunCompilation() && (result == TypeCompareState::MustNot)
&& !GetAppDomain()->ToCompilationDomain()->GetTargetModule()->IsSystem()
&& !IsLargeVersionBubbleEnabled())
{
result = TypeCompareState::May;
}
Expand Down