Skip to content

Allow length of zero for ByteMemory - #8273

Merged
TIHan merged 1 commit into
dotnet:masterfrom
TIHan:bug/il-reader-fix
Jan 19, 2020
Merged

Allow length of zero for ByteMemory#8273
TIHan merged 1 commit into
dotnet:masterfrom
TIHan:bug/il-reader-fix

Conversation

@TIHan

Copy link
Copy Markdown
Contributor

No description provided.

@TIHanTIHan changed the title Allow length of one for ByteMemoryAllow length of zero for ByteMemoryJan 18, 2020
@forki

Copy link
Copy Markdown
Contributor

O_O

@cartermpcartermp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change is fine, but why 0 bytes?

@TIHan

Copy link
Copy Markdown
ContributorAuthor

ByteMemory is analogous to .NET's Memory type that has a notion if it's empty or not: https://docs.microsoft.com/en-us/dotnet/api/system.memory-1.empty?view=netcore-3.1#System_Memory_1_Empty

This should also fix a regression that we have when trying to compile an ASP .NET project as there are IL resources that have a length of zero.

@TIHan
TIHan merged commit 7b3c2af into dotnet:masterJan 19, 2020
brettfo pushed a commit to brettfo/fsharp that referenced this pull request Jan 21, 2020
brettfo added a commit that referenced this pull request Jan 21, 2020
Co-authored-by: Will Smith <lol.tihan@gmail.com>
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Feb 23, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@TIHan@forki@cartermp