-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add and use TargetFramework.Net70 #64490
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
edcf3d0
Add TargetFramework.Net70
jcouv ad69fb6
Remove RuntimeSupportsByRefFields setter
jcouv 34ac0ac
Remove RuntimeSupportsNumericIntPtr setter
jcouv ab4209b
Remove unused method
jcouv 080e20c
Remove added validation
jcouv 40be908
Merge remote-tracking branch 'dotnet/main' into net-70
jcouv e0f2dd2
Merge conflict and fix Verification.PassesOrFailFast
jcouv fd1c7a7
Another conflict
jcouv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -442,19 +442,16 @@ internal bool RuntimeSupportsStaticAbstractMembersInInterfaces | |
|
||
/// <summary> | ||
/// Whether the target runtime supports numeric IntPtr types. | ||
/// This test hook should be removed once TargetFramework.Net70 is added. | ||
/// Tracked by https://github.com/dotnet/roslyn/issues/61235 | ||
/// </summary> | ||
internal virtual bool RuntimeSupportsNumericIntPtr | ||
internal bool RuntimeSupportsNumericIntPtr | ||
{ | ||
get | ||
{ | ||
// CorLibrary should never be null, but that invariant is broken in some cases for MissingAssemblySymbol. | ||
// Tracked by https://github.com/dotnet/roslyn/issues/61262 | ||
return CorLibrary?.RuntimeSupportsNumericIntPtr == true; | ||
return CorLibrary is not null && | ||
RuntimeSupportsFeature(SpecialMember.System_Runtime_CompilerServices_RuntimeFeature__NumericIntPtr); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider separating product changes and infrastructure changes into separate PRs |
||
} | ||
|
||
set => CorLibrary.RuntimeSupportsNumericIntPtr = value; | ||
} | ||
|
||
protected bool RuntimeSupportsFeature(SpecialMember feature) | ||
|
@@ -467,22 +464,8 @@ protected bool RuntimeSupportsFeature(SpecialMember feature) | |
internal bool RuntimeSupportsUnmanagedSignatureCallingConvention | ||
=> RuntimeSupportsFeature(SpecialMember.System_Runtime_CompilerServices_RuntimeFeature__UnmanagedSignatureCallingConvention); | ||
|
||
internal virtual bool RuntimeSupportsByRefFields | ||
{ | ||
get | ||
{ | ||
// CorLibrary should never be null, but that invariant is broken in some cases for MissingAssemblySymbol. | ||
// Tracked by https://github.com/dotnet/roslyn/issues/61262 | ||
return CorLibrary?.RuntimeSupportsByRefFields == true; | ||
} | ||
|
||
set | ||
{ | ||
// The setter should be removed once TargetFramework.Net70 is added | ||
// Tracked by https://github.com/dotnet/roslyn/issues/61463 | ||
CorLibrary.RuntimeSupportsByRefFields = value; | ||
} | ||
} | ||
internal bool RuntimeSupportsByRefFields | ||
=> RuntimeSupportsFeature(SpecialMember.System_Runtime_CompilerServices_RuntimeFeature__ByRefFields); | ||
|
||
/// <summary> | ||
/// True if the target runtime support covariant returns of methods declared in classes. | ||
|
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the
CorLibrary
check needed here? It's not included in similar properties below. #ResolvedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is. One test reaches this with a null CorLibrary (
CompilationReferences_More
, crash inEmitDifference
). This is tracked by above issue.I'm not sure why numeric IntPtr is uniquely susceptible, but it might be because it's involved in metadata decoding for a type that already exists in the BCL ref assemblies.