Skip to content

Conversation

@TIHan
Copy link
Contributor

@TIHan TIHan commented Jan 18, 2020

No description provided.

@TIHan TIHan changed the title Allow length of one for ByteMemory Allow length of zero for ByteMemory Jan 18, 2020
@TIHan TIHan force-pushed the bug/il-reader-fix branch from 4004a87 to 24f2dd8 Compare January 18, 2020 15:11
@forki
Copy link
Contributor

forki commented Jan 18, 2020

O_O

Copy link
Contributor

@cartermp cartermp left a comment

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
Contributor Author

TIHan commented Jan 19, 2020

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:master Jan 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 free to 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